WO2024099353A1 - 视频处理方法、装置、电子设备及存储介质 - Google Patents

视频处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2024099353A1
WO2024099353A1 PCT/CN2023/130439 CN2023130439W WO2024099353A1 WO 2024099353 A1 WO2024099353 A1 WO 2024099353A1 CN 2023130439 W CN2023130439 W CN 2023130439W WO 2024099353 A1 WO2024099353 A1 WO 2024099353A1
Authority
WO
WIPO (PCT)
Prior art keywords
special effect
image
target
type
processed
Prior art date
Application number
PCT/CN2023/130439
Other languages
English (en)
French (fr)
Inventor
卢智雄
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2024099353A1 publication Critical patent/WO2024099353A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/24Indexing scheme for image data processing or generation, in general involving graphical user interfaces [GUIs]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/32Image data format

Definitions

  • the embodiments of the present disclosure relate to a video processing method, device, electronic device and storage medium.
  • the present disclosure provides a video processing method, device, electronic device and storage medium to determine the corresponding style special effect type based on images, text and the combination of the two, and then, based on the style special effect type, convert the text and image into the effect of the target special effect image, thereby improving the accuracy of determining the style special effect type and further improving the image quality and special effect display effect of the target special effect image.
  • an embodiment of the present disclosure provides a video processing method, the method comprising:
  • the special effect selection information includes at least one of the following information: target text, image input features, and an image to be processed;
  • Target special effect image Convert the target text and/or the image to be processed into the target special effect type.
  • Target special effect image Convert the target text and/or the image to be processed into the target special effect type.
  • an embodiment of the present disclosure further provides a video processing device, the device comprising:
  • a special effect trigger operation response module used to determine special effect selection information in response to the special effect trigger operation; wherein the special effect selection information includes at least one of the following information: target text, image input features and image to be processed;
  • a target special effect type determination module used to determine a target special effect type from the at least one special effect type to be applied
  • a target special effect image determination module is used to convert the target text and/or the image to be processed into a target special effect image corresponding to the target special effect type.
  • an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
  • processors one or more processors
  • a storage device for storing one or more programs
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the video processing method as described in any one of the embodiments of the present disclosure.
  • the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the video processing method as described in any one of the embodiments of the present disclosure.
  • FIG1 is a schematic flow chart of a video processing method provided by an embodiment of the present disclosure.
  • FIG2 is a schematic flow chart of a video processing method provided by an embodiment of the present disclosure.
  • FIG3 is a schematic flow chart of a video processing method provided by an embodiment of the present disclosure.
  • FIG4 is a schematic flow chart of a video processing method provided by an embodiment of the present disclosure.
  • FIG5 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure.
  • a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information.
  • the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
  • the method of sending the prompt information to the user may be, for example, a pop-up window, in which the prompt information may be presented in text.
  • the pop-up window may also carry a selection control for the user to choose "agree” or "disagree” to provide personal information to the electronic device.
  • the technical solution of the embodiment of the present disclosure can be applied to any scenario that requires the generation of special effect videos. For example, when a user uploads a pre-captured image to the server corresponding to the application software, or captures an image in real time through a mobile terminal including a camera device, and at the same time, obtains the target text input by the user based on the display interface of the terminal device, based on the technical solution of the embodiment of the present disclosure, when determining the target special effect image, there can be three implementation methods.
  • the first implementation method can be: when only the target text is obtained, at least one type of special effect to be applied can be determined based on the keywords in the target text, and then, based on user needs or system selection, the target special effect type can be determined in at least one type of special effect to be applied. Furthermore, the target text can be converted into an associated image associated with it, so that the associated image and the target image corresponding to the target special effect type can be fused to obtain the target special effect image; the second implementation method can be: when only the image to be processed is obtained, the image content in the image to be processed can be determined. At least one type of special effect to be applied is determined, and then, based on user needs or system selection, a target special effect type is determined from at least one type of special effect to be applied.
  • a third implementation method can be: when the target text and the image to be processed are obtained at the same time, the two can be combined to determine at least one type of special effect to be applied, and then, based on user needs or system selection, a target special effect type is determined from at least one type of special effect to be applied.
  • the associated image, the image to be processed and the target image corresponding to the target special effect type can be fused to obtain the target special effect image, thereby achieving the effect of determining the corresponding style special effect type based on the image, text and the combination of the two, and then, based on the style special effect type, converting the text and the image into the target special effect image, thereby improving the accuracy of determining the style special effect type and further improving the image quality of the target special effect image and the special effect display effect.
  • FIG1 is a flow chart of a video processing method provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure is applicable to the case where a target special effect type is determined based on target text and/or an image to be processed, and then the target text and/or the image to be processed is converted into a target special effect image corresponding to the target special effect type.
  • the method can be executed by a video processing device, which can be implemented in the form of software and/or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.
  • the technical solution provided by the embodiment of the present disclosure can be executed based on a client, can be executed based on a server, or can be executed based on the cooperation of a client and a server.
  • the method comprises:
  • the device for executing the method for generating special effects video can be integrated into the application software that supports the special effects video processing function, and the software can be installed in the electronic device.
  • the electronic device can be a mobile terminal or a PC, etc.
  • the application software can be a type of software for image/video processing.
  • the specific application software will not be described here one by one, as long as the image/video processing can be realized. It can also be a specially developed application program to realize the software for adding special effects and displaying special effects, or it can be integrated in the corresponding page, and the user can realize the processing of special effects video through the page integrated in the PC.
  • controls for triggering special effects can be developed in advance.
  • the special effect triggering operation can be responded to, thereby determining the special effect selection information.
  • the special effect selection information includes at least one of the following information: target text, image input features and image to be processed.
  • the target text may be text that matches the user's needs.
  • the image input feature may be a feature determined by performing feature analysis on the captured image.
  • the image to be processed may be an image that needs to be processed.
  • the image may be an image captured based on a terminal device, or may be an image pre-stored in a storage space by an application software.
  • the terminal device may refer to an electronic product with an image capture function, such as a camera, a smart phone, and a tablet computer.
  • determining special effect selection information includes determining image input features, wherein: the image input features are determined based on whether the retrieved camera is a front camera or a rear camera.
  • the terminal device may call the front camera based on the pre-set capture parameters or the capture parameters set when the application was last exited.
  • the image is captured by the front camera or the rear camera.
  • the image input features corresponding to the images captured by the front camera and the image input features corresponding to the images captured by the rear camera are different.
  • most of the images captured by the front camera are user facial images, and the corresponding image input features can be features corresponding to the user's facial features; most of the images captured by the rear camera are full-body or half-body images of the user, and the corresponding image input features can be based on the facial features and add limb features.
  • a user when it is detected that a user triggers a special effect operation, it can first determine whether the camera being called is a front camera or a rear camera, and then determine the corresponding image input features based on the image feature parameters corresponding to the camera.
  • the advantage of this setting is that it enhances the intelligence of special effect props, improves the accuracy of determining special effect types, and improves the user experience.
  • the special effect selection information is usually determined only when certain special effect operations are triggered.
  • the special effect triggering operation may include at least one of the following: triggering special effect props; audio information triggering special effect wake-up words; the current body movement is consistent with the preset body movement.
  • a control for triggering special effects props can be pre-set.
  • a special effects prop display page can be popped up on the display interface, and multiple special effects props can be displayed in the display page.
  • the user can trigger the corresponding special effects props.
  • the user's audio information can be pre-collected, and the collected audio information is analyzed and processed to identify the text corresponding to the audio information.
  • the wake-up word can be: "Please take a picture of the current image” or "Please turn on the special effects function" and other types of words, it means that the image to be processed in the display interface can be obtained.
  • Another implementation method is: some body movements can be pre-set as special effects triggering actions. When it is detected that the body work currently performed by the user in the field of view is consistent with the pre-set body movement, it can be determined that the special effects operation is triggered.
  • the preset body movement can be raising hands, opening the mouth, or turning the head.
  • corresponding text can be entered based on the edit box displayed in the terminal device display interface, and the text entered in the edit box can be used as the target text; a pre-voice collection control can also be developed in advance.
  • the voice collection control the user's audio information can be collected, and the collected audio information can be analyzed and processed to identify the text corresponding to the audio information, and the identified text can be used as the target text.
  • S120 Determine at least one type of special effect to be applied corresponding to the special effect selection information.
  • the special effect type to be applied may be a special effect type for performing stylized special effect processing on an image.
  • the special effect type to be applied may include but is not limited to a cyberpunk type, a Picasso style type, a Van Gogh style type, an ink painting type, and a geometric painting type.
  • the type of special effect to be applied corresponding to the special effect selection information can be determined.
  • the method for determining the type of special effects to be applied corresponding to the target text and the method for determining the type of special effects to be applied corresponding to the image to be processed are different. Therefore, when determining the corresponding type of special effects to be applied, they can be processed based on the corresponding determination methods respectively.
  • At least one key field may be pre-set, and a mapping relationship between each key field and a corresponding special effect type to be applied may be established.
  • each field contained in the target text may be traversed based on each key field to determine at least one target key field corresponding to the target text, and based on the mapping relationship between each target key field and the corresponding special effect type to be applied, at least one special effect type to be applied corresponding to the target text may be determined.
  • determining at least one type of special effect to be applied corresponding to the image to be processed may include performing image content analysis on the image to be processed based on a preset algorithm to obtain a text description corresponding to the image to be processed, and determining the image content corresponding to the image to be processed based on the text description.
  • the scene included in the image to be processed is determined based on the image content, and further, based on the pre-constructed mapping relationship between the scene and the special effect type to be applied, at least one special effect type to be applied corresponding to the image to be processed is determined.
  • At least one type of special effect to be applied corresponding to the target text and at least one type of special effect to be applied corresponding to the image to be processed may be different special effect types or the same special effect type.
  • special effect types to be applied there may be one or more special effect types to be applied corresponding to the target text.
  • special effect image processing can be performed based on this special effect type; if there are multiple special effect types to be applied, a selection can be made from the multiple special effect types to be applied to perform special effect image processing based on the selected special effect type to be applied.
  • each special effect type in order to enable users to understand the type name of each special effect type to be applied and intuitively see the special effect display effect corresponding to each special effect type to be applied, after determining at least one special effect type to be applied, it also includes: displaying the special effect cover image and the corresponding text description corresponding to each special effect type to be applied on the display interface.
  • the special effect cover image can be an image used to characterize the special effect display effect of the corresponding special effect type to be applied. It should be noted that the image that is most similar to the style characteristics of each special effect type to be selected can be used as the special effect cover image of this special effect type to be selected in advance, and stored in the storage space accordingly, so that when at least one special effect type to be applied is determined from each special effect type to be selected, the special effect cover image corresponding to each special effect type to be applied can be retrieved respectively and displayed on the display interface.
  • the text description can include the special effect name, special effect type, and special effect introduction.
  • the special effect cover image corresponding to each type of special effect to be applied can be retrieved, and the text description corresponding to each type of special effect to be applied can be determined. Furthermore, each special effect cover image and the corresponding text description are displayed on the display interface according to preset arrangement rules.
  • the preset arrangement rule may be a preset special effect type arrangement rule.
  • the preset arrangement rule may include a random arrangement rule, a default arrangement rule determined according to the user's historical data, or a preset arrangement rule.
  • the preset arrangement rule may include a list type, a tile type, a ring type, etc.
  • S130 Determine a target special effect type from at least one special effect type to be applied.
  • the special effect type is screened to obtain a target special effect type.
  • the target special effect type may be a special effect type of the final application.
  • the target special effect type may be a cyberpunk type, in which case the final special effect image may be similar to the image style of cyberpunk.
  • a target special effect type from at least one special effect type to be applied.
  • One way may be: determining the target special effect type based on a triggering operation of at least one special effect type to be applied.
  • each type of special effect to be applied can be displayed in a display interface so that the user can select from multiple types of special effect to be applied through a trigger operation.
  • the user's trigger operation on at least one special effect to be applied is detected and a confirmation instruction is issued based on the determination control, the at least one currently selected special effect type to be applied can be used as the target special effect type.
  • the special effect cover image corresponding to this special effect type to be applied can be enlarged according to a preset ratio to distinguish this special effect type to be applied from other special effect types to be applied that have not been triggered.
  • Another way may be: if no triggering operation on at least one special effect type to be applied is detected within a preset time period, a target special effect type is selected from at least one special effect type to be applied in a preset way.
  • the preset duration may be a preset selection duration.
  • the preset duration may be any value, and may optionally be 5 seconds.
  • the preset method may be a preset special effect type selection method.
  • the preset method includes random, determining according to historical data of the target user, or presetting a default special effect type.
  • the pre-set default special effect type may be any special effect type, and may optionally be a cyberpunk special effect type.
  • a special effect type selection countdown can also be displayed in the display interface, and the countdown time is the preset selection duration. It can be understood that the user can select from multiple special effect types to be applied through a trigger operation. When the selection duration reaches the preset duration, that is, when the special effect type selection countdown returns to zero, if no trigger operation for each special effect type to be applied is detected within this interval, the target special effect type can be selected from at least one special effect type to be applied in a preset manner.
  • the benefits of determining the target special effect type based on the above two methods are: enhancing the user's interactive experience when using special effect props, meeting the user's personalized needs, and at the same time, providing Improved the intelligence of special effects props.
  • target special effect type determined based on the preset method can be changed by customizing the default selection parameters in this special effect prop.
  • the transition animation may be a pre-set animation for representing the transition and conversion between scenes.
  • the transition animation may include fade-in and fade-out or entering and exiting a picture.
  • multiple types of transition animations may be pre-developed in the early development stage, and the user may determine the transition animation played during the special effect processing by setting the parameters of the transition animation in the special effect props, so that after determining the target special effect type, the corresponding transition animation may be played, thereby displaying the target special effect image based on the transition animation.
  • the process of playing the transition animation also includes: displaying a production progress bar for producing the target special effects image at the target display position corresponding to the transition animation.
  • the production progress bar can be an image used to represent the production completion percentage of the target special effect image.
  • the production progress bar can be of any shape, and can be a strip, a ring, a node, or a shape that matches the target special effect type. It should be noted that the style of the production progress bar can also be set in the setting parameters of the special effect props based on user needs to meet the user's personalized needs.
  • a production progress bar for indicating the completion status of the target special effect image can be displayed at the target display position corresponding to the transition animation.
  • S140 Convert the target text and/or the image to be processed into a target special effect image corresponding to the target special effect type.
  • the target text and/or the image to be processed can be converted into a target special effect image corresponding to the target special effect type, wherein the target special effect image is the special effect image displayed in the display interface after being processed by the special effect props.
  • the target special effect image can be determined based on the target text and the target special effect type; if the image to be processed is obtained when the special effect operation is triggered, the target special effect image can be determined based on the image to be processed and the target special effect type; if the target text and the image to be processed are obtained when the special effect operation is triggered, the target special effect image can be determined based on the target text, the image to be processed and the target special effect type.
  • the target text and/or the image to be processed is converted into a target special effect image corresponding to the target special effect type, including: determining a target image associated with the target special effect type; fusing the associated image and/or the image to be processed associated with the target text with the target image to obtain the target special effect image.
  • the target image may be a pre-stored special effect image material.
  • the target image associated therewith is an image associated with the ink painting type, that is, an image drawn in the form of ink painting.
  • a corresponding type identifier is set for each special effect type to be applied, and at the same time, at least one image to be applied corresponding to each special effect type to be applied is determined, and an association relationship between the type identifier and the corresponding image to be applied is established.
  • each image to be applied is stored in an image material library, so that when the target special effect type is determined, the corresponding target image can be retrieved from the image material library based on the identifier corresponding to the target special effect type.
  • the associated image associated with the target text may be an image determined based on the keywords contained in the target text. For example, when the target text is "baby, a beautiful illustration concept art anime key visual trending pixiv fanbox by makoto shinkai and studio ghibli, visually stunning", the associated associated image is an image containing a baby.
  • the associated image, the image to be processed and the target image can be fused based on a preset image processing algorithm to obtain a target special effect display image.
  • the image processing algorithm can be a color lookup table (LUT).
  • LUT color lookup table
  • the target image associated with the target special effect type can be retrieved. Furthermore, if only the target text exists, the target image associated with the target text can be retrieved.
  • the associated image associated with the word is fused with the target image to obtain a target special effect image that converts the associated image into a style similar to that of the target image; if there is only an image to be processed, the image to be processed and the target image can be fused to obtain a target special effect image that converts the image to be processed into a style similar to that of the target image; if both the target word and the image to be processed exist, the associated image associated with the target word, the image to be processed and the target image can be fused to obtain a target special effect image that is similar to the style of the target image.
  • the advantage of this setting is that it improves the special effect display effect of the target special effect image, meets the personalized needs of users, and improves the user experience.
  • the special effect intensity can also be adjusted in advance so that the target special effect image generated in the end can better meet user needs.
  • the special effect intensity when the special effect intensity is set to "0", the target special effect image has the highest similarity with the image to be processed and/or the associated image, and does not reflect the style characteristics of the target image; when the special effect intensity is set to "0.5", the target special effect image has a moderate similarity with the image to be processed and/or the associated image, and at the same time, reflects the style characteristics of the target image; when the special effect intensity is set to "1", the target special effect image has the lowest similarity with the image to be processed and/or the associated image, and at the same time, fully reflects the style characteristics of the target image.
  • the special effect image can be pre-processed based on preset parameters before generating the target special effect image, so that the target special effect image can be finally obtained.
  • the target special effect image before obtaining the target special effect image, it also includes: determining filter parameters corresponding to the target special effect type, so as to determine the target special effect image based on the filter parameters.
  • the filter parameters may be custom parameters corresponding to the target special effect type.
  • the filter parameters may include, but are not limited to, saturation, contrast, clarity, highlights, shadows, and hue. It should be noted that for each target special effect type, filter parameters that match it may be pre-set, so that when the target special effect type is determined, the image to be processed may be edited directly based on the corresponding filter parameters to obtain the target special effect image.
  • the corresponding filter parameter may be to set the saturation to 0; when the target special effect type is a cyberpunk type, the corresponding filter parameter may be to enhance the red-blue contrast and increase the highlight.
  • the technical solution of the embodiment of the present disclosure determines special effect selection information in response to a special effect triggering operation, and then determines at least one type of special effect to be applied corresponding to the special effect selection information, and further
  • the target special effect type is determined from at least one special effect type to be applied, and finally, the target text and/or the image to be processed is converted into a target special effect image corresponding to the target special effect type, thereby realizing the determination of the corresponding style special effect type based on the image, text, and the combination of the two, and then, based on the style special effect type, the text and image are converted into the target special effect image, which improves the accuracy of determining the style special effect type, further improves the image quality of the target special effect image and the special effect display effect, and at the same time, enhances the user's interactivity in using the special effect props, and further improves the user's usage experience.
  • FIG2 is a flow chart of a video processing method provided by an embodiment of the present disclosure.
  • the target special effect type can be determined based on the target text, and the target text can be converted into a target special effect image corresponding to the target special effect type.
  • the specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same as or corresponding to the above-mentioned embodiment are not repeated here.
  • the method specifically includes the following steps:
  • the target text can also be obtained, so that the application software can process the image to be processed based on the information contained in the target text.
  • determining special effect selection information includes obtaining target text; obtaining the target text includes: displaying a text editing box in a target area of the display interface to edit the target text in the text editing box.
  • the target area can be any area in the display interface.
  • the text editing box can be a window for supporting text editing.
  • the text editing box can be used to receive user input and editing of text.
  • functions such as deletion, moving the insertion position and selecting text can also be implemented.
  • a text editing control can be developed in advance.
  • a text editing box can be displayed in the target area of the display interface, so that the user can enter or edit the target text in the text editing box; or, when a user triggers a special effect operation, a text editing box can be directly displayed in the target area of the display interface, so that the user can edit the target text in this editing box.
  • the advantages of this setting are: improving the interactivity between the user and the display interface, meeting the personalized needs of the user, and improving the user experience.
  • S220 Determine at least one type of special effect to be applied corresponding to the target text.
  • At least one type of special effect to be applied corresponding to the target text can be determined.
  • determining at least one special effect type to be applied corresponding to the target text includes: performing word segmentation processing on the target text to determine at least one keyword corresponding to the target text; and determining at least one special effect type to be applied from multiple special effect types to be selected based on the at least one keyword.
  • the target text may be segmented based on a preset segmentation algorithm, wherein the preset segmentation algorithm may be any algorithm that can implement segmentation, and may optionally be a natural language processing algorithm.
  • the preset segmentation algorithm may be any algorithm that can implement segmentation, and may optionally be a natural language processing algorithm.
  • the keyword may be a pre-set vocabulary that can be recognized by the application software.
  • at least one keyword corresponding to the target text includes at least one of an object type, a scene, a style type, and an environment.
  • the object type may be an object type that needs to be processed with special effects contained in the target text.
  • the object type may include people, pets, cartoon characters, food, flowers and plants, and buildings.
  • the scene may include but is not limited to indoor, night scene, street scene, and sunset.
  • the style type may be a stylized image type input by the user.
  • the style type may include but is not limited to oil painting type, ink painting type, cartoon type, and line drawing type.
  • the environment may include but is not limited to mountains, lakes, seas, and skies.
  • the target text is "A beautiful painting by vincent van gogh, Post Impressionism, oil on canvas, trending on art station, starry night"
  • the corresponding keyword includes the style type "post-impressionist canvas oil painting style”.
  • multiple keywords can be set in advance, and special effect types corresponding to each keyword can be produced respectively. These special effect types can be used as special effect types to be selected. Furthermore, an association relationship between each keyword and the corresponding special effect type to be selected is established, and each special effect type to be selected is stored in a preset storage space.
  • the target text after obtaining the target text, can be segmented based on a preset segmentation algorithm to obtain at least one field, and each field can be traversed based on a preset keyword to determine at least one keyword corresponding to the target text. Furthermore, based on the association between the keyword and the special effect type to be selected, at least one special effect type to be applied corresponding to the target text can be determined from multiple special effect types to be selected.
  • the advantage of this setting is that it improves the accuracy of screening the special effect type to be applied, meets the personalized needs of users, and at the same time, improves the intelligence of special effect props.
  • the type of special effect to be applied can be one or more.
  • this special effect type can be used as the target special effect type to be processed based on this target special effect type; when there are multiple special effect types to be applied, you can select from these special effect types to be applied based on user needs to determine the target special effect type.
  • the target text can be edited again, and keywords can be added or deleted on the original basis, so that the types of special effects to be applied can better meet user needs.
  • S230 Determine a target special effect type from at least one special effect type to be applied.
  • the target image corresponding to the target special effect type can be determined, and at the same time, the associated image associated with the target text can be determined. Further, the associated image and the target image are fused to obtain the target special effect image corresponding to the target special effect type.
  • the technical solution of the disclosed embodiment obtains target text in response to a special effect trigger operation, then determines at least one type of special effect to be applied corresponding to the target text, further determines a target special effect type from at least one special effect type to be applied, and finally, converts the target text into a target special effect image corresponding to the target special effect type, thereby achieving an effect of determining a corresponding stylized special effect type based on keywords in the text, and then converting the text into a corresponding target special effect image, thereby meeting the personalized needs of users, enhancing interactivity when using special effect props, and improving user experience.
  • FIG3 is a flow chart of a video processing method provided by an embodiment of the present disclosure.
  • the target special effect type can be determined based on the image to be processed, and the image to be processed can be converted into a target special effect image corresponding to the target special effect type.
  • the specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same as or corresponding to the above-mentioned embodiment are not repeated here.
  • the method specifically includes the following steps:
  • obtaining the image to be processed may include at least two methods.
  • One method may be: selecting based on a plurality of images pre-stored in the storage space to obtain the image to be processed.
  • an image upload control is displayed on the display interface; when a trigger operation on the image upload control is detected, jump to the target image library to determine the image to be processed from the target image library.
  • the image upload control may be a control that is pre-set in the early development stage and is used to perform the image upload function. It should be noted that the image upload control may be set in any area of the display interface, and the disclosed embodiment does not specifically limit this.
  • the target image library may be a storage space for storing image materials. The images contained in the target image library may include system default images pre-stored by developers, or may include custom images that are subsequently added by users during the application process.
  • an image upload control can be pre-set and displayed in a display interface.
  • the image upload control can be displayed in the display interface.
  • a target image library display page can be popped up in the display interface, or the display interface can be jumped to the target image display page. Multiple images to be selected can be displayed in the display page.
  • the image to be selected can be used as an image to be processed.
  • another implementation manner may be: when no triggering operation on the image upload control is detected within a preset time period, determining the image to be processed from at least one captured video frame.
  • the preset duration may be a pre-set selection duration.
  • the preset duration may be any value, and may be 3 seconds.
  • the terminal device when it is detected that the user triggers a special effect operation, the terminal device can turn on the shooting function to obtain the image to be processed.
  • the image selection countdown is displayed in the display interface, and the countdown time is the pre-set selection duration.
  • the image upload control will be displayed on the display interface.
  • the waiting time reaches the preset time, that is, when the image selection countdown returns to zero, and the user's triggering operation on the image upload control is not detected
  • the image to be processed can be determined in at least one video frame captured by the terminal device.
  • the advantage of this setting is that it enhances the flexibility and diversity of the method of obtaining the image to be processed, and at the same time, improves the interactivity between the user and the display interface, thereby improving the user experience.
  • determining the image to be processed from at least one captured video frame may include at least two methods, and one implementation method may be: when the countdown ends, the video frame captured by the terminal device at this moment is used as the image to be processed.
  • determining the image to be processed from at least one captured video frame includes: using the video frame captured when the countdown ends as the image to be processed.
  • the countdown displayed in the display interface will be reset to zero, and the terminal device can be restarted at the current time.
  • the captured video frames are used as images to be processed.
  • Another implementation manner may be: displaying at least one video frame captured within a preset time length, and determining an image to be processed based on a triggering operation on the at least one video frame.
  • the video shot by the terminal device within the preset time can be processed based on a preset program to obtain at least one video frame and displayed in the display interface.
  • the user can select from multiple video frames through a trigger operation.
  • the video frame currently selected by the user can be used as the image to be processed.
  • S320 Determine at least one type of special effect to be applied corresponding to the image to be processed.
  • At least one type of special effect to be applied corresponding to the image to be processed can be determined, wherein the type of special effect to be applied can be a special effect type adapted to the image content in the image to be processed.
  • the mapping relationship between the image content and the special effect type to be selected can be pre-constructed, that is, at least one special effect type to be selected that is most suitable for each image content is determined, so that after the image to be processed is obtained, its image content can be analyzed to determine at least one special effect type to be applied corresponding to the image to be processed.
  • the corresponding special effect type to be applied can include ink painting type or oil painting type, etc.; when the image to be processed is a portrait, the corresponding special effect type to be applied can include Japanese comic type, oil painting type and pixel style type, etc.; when the image to be processed is an image containing a pet, the corresponding special effect type to be applied can be an abstract painting style type.
  • determining at least one special effect type to be applied corresponding to the image to be processed includes: determining the image content of the image to be processed; and determining at least one special effect type to be applied from at least one special effect type to be selected based on the image content and a pre-established mapping relationship.
  • the image content may be a description of the object, scene, and environment contained in the image to be processed.
  • the image content may include at least one of the following: object type, scene, style, and environment.
  • the object type may be the type of object contained in the image to be processed.
  • the object type may include people, pets, landscapes, and buildings. It should be noted that the object contained in the image to be processed may be one or more objects; when the image to be processed When there is one object in the processed image, the type of special effects to be applied corresponding to this object type can be determined; when there are multiple objects in the image to be processed and they correspond to multiple object types, at least one type of special effects to be applied that is compatible with the object types of these objects can be determined.
  • the scene may include but is not limited to indoor, night scene, street scene, sunset, etc.
  • the style type may be a style type corresponding to the image to be processed.
  • the style type may include but is not limited to oil painting type, ink painting type, cartoon type, line drawing type, etc.
  • the environment may include but is not limited to mountains, lakes, seas, and skies, etc.
  • the mapping relationship may be a pre-constructed mapping relationship between image content and the special effect type to be selected, wherein the mapping relationship includes each image content and at least one corresponding special effect type to be selected.
  • the image to be processed can be processed based on a preset algorithm to determine the image content corresponding to the image to be processed. Further, the image content is analyzed, and according to a pre-established mapping relationship, at least one type of special effects to be applied that is compatible with the image content is determined from multiple types of special effects to be selected, thereby finally obtaining at least one type of special effects to be applied that corresponds to the image to be processed.
  • the benefits of such a setting are: improving the intelligence and personalized adaptability of special effects props, reducing the error rate of the target special effects image, and improving the user experience.
  • S330 Determine a target special effect type from at least one special effect type to be applied.
  • S340 Convert the image to be processed into a target special effect image corresponding to the target special effect type.
  • the target image corresponding to the target special effect type can be determined, and further, the image to be processed is fused with the target image to obtain the target special effect image corresponding to the target special effect type.
  • the technical solution of the disclosed embodiment obtains an image to be processed in response to a special effect trigger operation, then determines at least one type of special effect to be applied corresponding to the image to be processed, further determines a target special effect type from at least one special effect type to be applied, and finally, converts the image to be processed into a target special effect image corresponding to the target special effect type, thereby achieving the effect of determining a corresponding stylized special effect type based on image content and then converting the image into a corresponding target special effect image, thereby improving the intelligence of special effect props and effectively improving the display effect of the target special effect image.
  • FIG4 is a flow chart of a video processing method provided by an embodiment of the present disclosure.
  • both the target text and the image to be processed are obtained.
  • the target special effect type is determined based on the target text and the image to be processed, the target special effect type can be converted into a target special effect image corresponding to the target special effect type.
  • the specific implementation method can refer to the technical solution of this embodiment. Among them, the technical terms that are the same or corresponding to the above embodiment are not repeated here.
  • the method specifically includes the following steps:
  • S420 Determine at least one type of special effect to be applied corresponding to the target text and the image to be processed.
  • the type of special effect to be applied may include at least one type of special effect corresponding to the target text and at least one type of special effect corresponding to the image to be processed; or at least one type of special effect corresponding to both the target text and the image to be processed, etc., which is not specifically limited in this embodiment of the disclosure.
  • the corresponding implementation method may be: determining a first special effect type corresponding to the target text, and a second special effect type corresponding to the image to be processed; determining a union including the first special effect type and the second special effect type, and obtaining at least one special effect type to be applied.
  • the first special effect type may be a special effect type determined by analyzing the keywords contained in the target text.
  • the second special effect type may be a special effect type determined by analyzing the image content in the image to be processed. It should be noted that the number of the first special effect type and the second special effect type may be one or more.
  • the first special effect type corresponding to the target text can be determined based on the keywords contained in the target text
  • the second special effect type corresponding to the image to be processed can be determined based on the image content of the image to be processed
  • the first special effect type and the second special effect type are merged to obtain a union including the first special effect type and the second special effect type, and the union is used as a set corresponding to at least one special effect type to be applied, thereby obtaining at least one special effect type to be applied corresponding to the target text and the image to be processed.
  • the corresponding implementation method may be: determining a first special effect type corresponding to the target text and a second special effect type corresponding to the image to be processed; determining the intersection of the first special effect type and the second special effect type to obtain at least one special effect type to be applied.
  • the first special effect type and the second special effect type can be subjected to intersection processing. Specifically, at least one special effect type that overlaps with the first special effect type and the second special effect type is determined, and based on these special effect types, a corresponding intersection is constructed. Then, this intersection is used as a set corresponding to at least one special effect type to be applied, thereby obtaining at least one special effect type to be applied corresponding to the target text and the image to be processed.
  • the benefit of determining at least one type of special effects to be applied based on the above two methods is that it enhances the flexibility and diversity of the methods for determining the types of special effects to be applied, improves the intelligence of special effects props, and thereby improves the richness and fun of the target special effects images, thereby improving the user experience.
  • S430 Determine a target special effect type from at least one special effect type to be applied.
  • the target image corresponding to the target special effect type can be determined, and at the same time, the associated image associated with the target text can be determined. Furthermore, the associated image, the image to be processed and the target image are fused to obtain the target special effect image corresponding to the target special effect type.
  • the technical solution of the disclosed embodiment obtains the target text and the image to be processed in response to the special effect triggering operation, then determines at least one type of special effect to be applied corresponding to the target text and/or the image to be processed, further determines the target special effect type from at least one type of special effect to be applied, and finally converts the target text and/or the image to be processed into a target special effect image corresponding to the target special effect type, thereby achieving the effect of determining the corresponding stylized special effect type based on the text and the image at the same time, and then converting the text and the image into the corresponding target special effect image, improving the accuracy of determining the stylized special effect type, further improving the image quality of the target special effect image and the special effect display effect, and at the same time, enhancing It strengthens the interactivity of users in using special effects props and further improves the user experience.
  • Figure 5 is a schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure. As shown in Figure 5, the device includes: a special effect trigger operation response module 510, a special effect type determination module 520 to be applied, a target special effect type determination module 530 and a target special effect image determination module 540.
  • the special effect trigger operation response module 510 is used to determine special effect selection information in response to the special effect trigger operation; wherein the special effect selection information includes at least one of the following information: target text, image input features and image to be processed;
  • a special effect type determination module 520 to be applied used to determine at least one special effect type to be applied corresponding to the special effect selection information
  • a target special effect type determination module 530 is used to determine a target special effect type from the at least one special effect type to be applied;
  • the target special effect image determination module 540 is used to convert the target text and/or the image to be processed into a target special effect image corresponding to the target special effect type.
  • the special effect trigger operation response module 510 includes: a to-be-processed image acquisition submodule.
  • the to-be-processed image acquisition submodule includes: a control display unit, a to-be-processed image first determination unit and a to-be-processed image second determination unit.
  • a control display unit used to display an image upload control on a display interface
  • a first determination unit for the image to be processed configured to jump to a target image library to determine the image to be processed from the target image library when a trigger operation on the image upload control is detected;
  • the second determination unit for the image to be processed is used to determine the image to be processed from at least one collected video frame when no triggering operation on the image upload control is detected within a preset time period.
  • the second image to be processed determining unit includes: a first image to be processed determining subunit and a second image to be processed determining subunit.
  • the first subunit for determining the image to be processed is used to use the video frame collected at the end of the countdown as the image to be processed; or,
  • the second subunit for determining the image to be processed is used to display at least one video frame collected within the preset time length, and determine the image to be processed based on a triggering operation on the at least one video frame.
  • the special effect triggering operation response module 510 includes: a target text acquisition submodule.
  • the target text acquisition submodule is used to display the text edit box in the target area of the display interface. Edit the target text in the text editing box.
  • the special effect triggering operation response module 510 includes: an image input feature determination submodule.
  • the image input feature determination submodule is used to determine the image input features based on whether the retrieved camera is a front camera or a rear camera.
  • the special effect selection information includes target text
  • the special effect type determination module 520 to be applied includes: a target text processing unit and a special effect type determination unit to be applied.
  • a target text processing unit configured to perform word segmentation processing on the target text to determine at least one keyword corresponding to the target text
  • the first determination unit of the special effect type to be applied is used to determine the at least one special effect type to be applied from a plurality of special effect types to be selected based on the at least one keyword.
  • the special effect selection information includes the image to be processed, and the special effect type determination module 520 to be applied further includes: an image content determination unit and a second special effect type determination unit to be applied.
  • An image content determination unit used to determine the image content of the image to be processed
  • a second determination unit for the special effect type to be applied configured to determine the at least one special effect type to be applied from at least one special effect type to be selected according to the image content and a pre-established mapping relationship;
  • the mapping relationship includes each image content and at least one corresponding special effect type to be selected.
  • the special effect selection information includes the image to be processed and the target text
  • the module 520 for determining the type of special effect to be applied further includes: a special effect type determination unit, a union determination unit and an intersection determination unit.
  • a special effect type determination unit which determines a first special effect type corresponding to the target text and a second special effect type corresponding to the image to be processed
  • a union determination unit configured to determine a union of the first special effect type and the second special effect type, to obtain the at least one special effect type to be applied;
  • An intersection determination unit is used to determine the intersection of the first special effect type and the second special effect type to obtain the at least one special effect type to be applied.
  • the device also includes: a special effect cover image display module.
  • the special effect cover image display module is used to, after determining the at least one special effect type to be applied, The special effect cover image and the corresponding text description corresponding to each special effect type to be applied are displayed on the display interface.
  • the target special effect type determination module 530 includes: a first target special effect type determination unit and a second target special effect type determination unit.
  • a first target special effect type determining unit configured to determine the target special effect type based on a triggering operation on the at least one special effect type to be applied;
  • a second target special effect type determination unit configured to select the target special effect type from the at least one special effect type to be applied in a preset manner if no triggering operation on the at least one special effect type to be applied is detected within a preset time period;
  • the preset method includes random, determining according to historical data of the target user or pre-setting a default special effect type.
  • the device further includes: a transition animation playing module.
  • the transition animation playing module is used to play the transition animation after determining the target special effect type, so as to display the target special effect image based on the transition animation.
  • the device further comprises: making a progress bar display module.
  • the production progress bar display module is used to display the production progress bar of the target special effect image at the target display position corresponding to the transition animation during the playing of the transition animation.
  • the target special effect image determination module 540 includes: a target image determination unit and an image fusion processing unit.
  • a target image determining unit used to determine a target image associated with the target special effect type
  • the image fusion processing unit is used to fuse the associated image associated with the target text and/or the image to be processed with the target image to obtain a target special effect image.
  • the device further includes: a filter parameter determination module.
  • a filter parameter determination module is used to determine the filter parameters corresponding to the target special effect type before the associated image and/or the image to be processed that will be associated with the target text is fused with the target image to obtain a target special effect image, so as to determine the target special effect image based on the filter parameters.
  • the image content of the image to be processed and/or the keywords of the target text include at least one of the following:
  • the object type the scene it belongs to, the style type it belongs to, and the environment it belongs to.
  • the technical solution of the disclosed embodiment determines special effect selection information in response to a special effect trigger operation, then determines at least one type of special effect to be applied corresponding to the special effect selection information, further determines a target special effect type from at least one type of special effect to be applied, and finally converts the target text and/or the image to be processed into a target special effect image corresponding to the target special effect type, thereby achieving the effect of determining the corresponding style special effect type based on image, text, and a combination of the two, and then converting text and image into the target special effect image based on the style special effect type, thereby improving the accuracy of determining the style special effect type, further improving the image quality of the target special effect image and the special effect display effect, and at the same time, enhancing the interactivity of the user in using the special effect props, and further improving the user's usage experience.
  • the video processing device provided in the embodiments of the present disclosure can execute the video processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
  • FIG6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure.
  • a schematic diagram of the structure of an electronic device 600 suitable for implementing an embodiment of the present disclosure is shown.
  • the terminal device 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 (e.g., vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG6 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603.
  • a processing device e.g., a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • various programs and data required for the operation of the electronic device 600 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604.
  • An edit/output (I/O) interface 605 is also connected to the bus 604.
  • input devices 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.
  • Output device 607 such as a liquid crystal display (LCD), a speaker, a vibrator, etc.
  • storage device 608 such as a magnetic tape, a hard disk, etc.
  • communication device 609 can allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data.
  • FIG. 6 shows an electronic device 600 with various devices, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or provided instead.
  • 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.
  • the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602.
  • the processing device 601 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the electronic device provided by the embodiment of the present disclosure and the video processing method provided by the above embodiment belong to the same inventive concept.
  • the technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
  • the embodiments of the present disclosure provide a computer storage medium on which a computer program is stored.
  • the program is executed by a processor, the video processing method provided by the above embodiments is implemented.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
  • 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.
  • 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 device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein the carrier
  • the computer-readable program code is a computer-readable program code.
  • This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • the computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device.
  • the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network).
  • HTTP HyperText Transfer Protocol
  • 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 currently known or future developed network.
  • the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device When the one or more programs are executed by the electronic device, the electronic device:
  • the computer-readable medium carries one or more programs.
  • the electronic device When the one or more programs are executed by the electronic device, the electronic device:
  • the special effect selection information includes at least one of the following information: target text, image input features, and an image to be processed;
  • the target text and/or the image to be processed is converted into a target special effect image corresponding to the target special effect type.
  • Computer program code for performing 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 a user's computer, partially on a user's computer, as a stand-alone software package, or partially on a user's computer.
  • the computer program may be executed partially on the remote computer or completely on the remote computer or server.
  • 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 it may be connected to an external computer (e.g., through the Internet using an Internet service provider).
  • LAN local area network
  • WAN wide area network
  • each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function.
  • the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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.
  • each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or hardware.
  • the name of a unit does not limit the unit itself in some cases.
  • the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
  • exemplary types of hardware logic components 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.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs systems on chip
  • CPLDs complex programmable logic devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing.
  • machine-readable storage media would include electrical connections based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), or a computer programmable read-only memory (USB).
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM compact disk read-only memory
  • USB computer programmable read-only memory
  • ROM read-only memory
  • optical storage devices magnetic storage devices, or any suitable combination of the above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Processing Or Creating Images (AREA)
  • Studio Circuits (AREA)

Abstract

本公开实施例提供了一种视频处理方法、装置、电子设备及存储介质,其中,该方法包括:响应于特效触发操作,确定特效选择信息;确定与特效选择信息相对应的至少一种待应用特效类型;从至少一种待应用特效类型中,确定目标特效类型;将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像。本公开实施例的技术方案,实现了基于图像、文字以及两者结合,确定相应的风格特效类型,进而,基于风格特效类型,将文字以及图像转换为目标特效图像的效果,提高了风格特效类型的确定精准度,进一步提高了目标特效图像的图像质量以及特效显示效果。

Description

视频处理方法、装置、电子设备及存储介质
本申请要求于2022年11月9日递交的中国专利申请第202211401216.X号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开实施例涉及一种视频处理方法、装置、电子设备及存储介质。
背景技术
随着网络技术的发展,越来越多的应用程序进入了用户的生活,尤其是一系列可以拍摄短视频的软件,深受用户的喜爱。
软件开发商可以在应用中添加各种各样的特效道具,以供用户在拍摄视频的过程中使用,然而,目前为用户提供的特效道具十分有限,视频的质量及其内容的丰富性都有待进一步提升,尤其是对图像进行风格化特效处理,或对图像进行编辑处理时,基于相关特效道具所生成的特效图像显示效果较差。
发明内容
本公开提供一种视频处理方法、装置、电子设备及存储介质,以实现基于图像、文字以及两者结合,确定相应的风格特效类型,进而,基于风格特效类型,将文字以及图像转换为目标特效图像的效果,提高了风格特效类型的确定精准度,进一步提高了目标特效图像的图像质量以及特效显示效果。
第一方面,本公开实施例提供了一种视频处理方法,该方法包括:
响应于特效触发操作,确定特效选择信息;其中,所述特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像;
确定与所述特效选择信息相对应的至少一种待应用特效类型;
从所述至少一种待应用特效类型中,确定目标特效类型;
将所述目标文字和/或待处理图像转换为与所述目标特效类型相对应的 目标特效图像。
第二方面,本公开实施例还提供了一种视频处理装置,该装置包括:
特效触发操作响应模块,用于响应于特效触发操作,确定特效选择信息;其中,所述特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像;
待应用特效类型确定模块,用于确定与所述特效选择信息相对应的至少一种待应用特效类型;
目标特效类型确定模块,用于从所述至少一种待应用特效类型中,确定目标特效类型;
目标特效图像确定模块,用于将所述目标文字和/或待处理图像转换为与所述目标特效类型相对应的目标特效图像。
第三方面,本公开实施例还提供了一种电子设备,所述电子设备包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本公开实施例任一所述的视频处理方法。
第四方面,本公开实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行如本公开实施例任一所述的视频处理方法。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1是本公开实施例所提供的一种视频处理方法流程示意图;
图2是本公开实施例所提供的一种视频处理方法流程示意图;
图3是本公开实施例所提供的一种视频处理方法流程示意图;
图4是本公开实施例所提供的一种视频处理方法流程示意图;
图5是本公开实施例所提供的一种视频处理装置结构示意图;以及
图6是本公开实施例所提供的一种电子设备的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求, 向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
在介绍本技术方案之前,可以先对应用场景进行示例性说明。可以将本公开实施例的技术方案应用于任意需要生成特效视频的场景中,示例性的,当用户将预先采集的图像上传至应用软件对应的服务端,或者,通过包含摄像装置的移动终端实时采集图像,同时,基于终端设备显示界面获取用户输入的目标文字时,即可基于本公开实施例的技术方案,在确定目标特效图像时,可以存在三种实现方式,第一种实现方式可以为:当仅获取目标文字时,可以根据目标文字中的关键词确定至少一种待应用特效类型,进而,基于用户需求或系统选择在至少一种待应用特效类型中确定出目标特效类型,进一步的,可以将目标文字转换为与其相关联的关联图像,从而可以将关联图像和与目标特效类型相对应的目标图像进行融合处理后,得到目标特效图像;第二种实现方式可以为:当仅获取待处理图像时,可以根据待处理图像中的图像内容,确定至少一种待应用特效类型,进而,基于用户需求或系统选择在至少一种待应用特效类型中确定出目标特效类型,进一步的,可以将待处理图像和与目标特效类型相对应的目标图像进行融合处理后,得到目标特效图像;第三种实现方式可以为:在同时获取目标文字和待处理图像时,可以将两者结合起来,确定至少一种待应用特效类型,进而,基于用户需求或系统选择在至少一种待应用特效类型中确定出目标特效类型,进一步的,可以将关联图像、待处理图像以及与目标特效类型相对应的目标图像进行融合处理后,得到目标特效图像,从而实现了基于图像、文字以及两者结合,确定相应的风格特效类型,进而,基于风格特效类型,将文字以及图像转换为目标特效图像的效果,提高了风格特效类型的确定精准度,进一步提高了目标特效图像的图像质量以及特效显示效果。
图1是本公开实施例所提供的一种视频处理方法流程示意图,本公开实施例适用于基于目标文字和/或待处理图像,确定目标特效类型,进而将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像的情形,该方法可以由视频处理装置来执行,该装置可以通过软件和/或硬件的形式实现,可选的,通过电子设备来实现,该电子设备可以是移动终端、PC端或服务器等。本公开实施例所提供的技术方案可以基于客户端执行,也可以基于服务端执行,还可以基于客户端和服务端配合执行。
如图1所示,所述方法包括:
S110、响应于特效触发操作,确定特效选择信息。
其中,执行本公开实施例提供的生成特效视频的方法的装置,可以集成在支持特效视频处理功能的应用软件中,且该软件可以安装至电子设备中,可选的,电子设备可以是移动终端或者PC端等。应用软件可以是对图像/视频处理的一类软件,其具体的应用软件在此不再一一赘述,只要可以实现图像/视频处理即可。还可以是专门研发的应用程序,来实现添加特效并将特效进行展示的软件中,亦或是集成在相应的页面中,用户可以通过PC端中集成的页面来实现对特效视频的处理。
在本实施例中,在支持特效视频处理功能的应用软件或应用程序中,可以预先开发用于触发特效的控件,当检测到用户触发该控件时,即可对特效触发操作进行响应,从而确定特效选择信息。
其中,特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像。
其中,目标文字可以为与用户需求相匹配的文字。图像输入特征可以为通过对所采集的图像进行特征分析后所确定的特征。待处理图像可以为需要进行处理的图像。该图像可以是基于终端设备采集的图像,也可以是应用软件在存储空间中预先存储的图像。终端设备可以指相机、智能手机以及平板电脑等具有图像拍摄功能的电子产品。
可选的,确定特效选择信息,包括确定图像输入特征,其中:基于调取的摄像头为前置摄像头或后置摄像头来确定图像输入特征。
一般情况下,当用户触发图像拍摄控件时,终端设备可能会基于预先设置的拍摄参数,或者前一次退出应用软件时所设置的拍摄参数,调取前置摄 像头或后置摄像头来进行图像采集。需要说明的是,前置摄像头所采集的图像所对应的图像输入特征,以及后置摄像头所采集的图像所对应的图像输入特征是不同的,示例性的,前置摄像头采集的图像大多数均为用户面部图像,其对应的图像输入特征可以为与用户面部五官相对应的特征;后置摄像头采集的图像大多数均为用户全身图或半身图,其对应的图像输入特征可以在面部五官特征的基础上,添加肢体特征。
在实际应用过程中,当检测到用户触发特效操作时,可以首先确定调取的摄像头为前置摄像头或者后置摄像头,进而,基于摄像头所对应的图像特征参数,确定相应的图像输入特征。这样设置的好处在于:增强了特效道具的智能性,并且,提高了特效类型的确定精准度,提升了用户的使用体验。
在实际应用中,通常在触发某些特效操作的情况下,才会确定特效选择信息,那么,特效触发操作可以包括如下至少一种:触发特效道具;音频信息触发特效唤醒词;当前肢体动作与预设肢体动作相一致。
在本实施例中,可以预先设置用于触发特效道具的控件,当用户触发该控件时,可以在显示界面上弹出特效道具显示页面,该显示页面中可以显示多个特效道具。用户可以触发相应的特效道具,当检测到用户触发了与采集待处理图像相对应的特效道具,则说明触发了特效触发操作。还有一种实现方式为:可以预先采集用户的音频信息,并对采集的音频信息分析处理,从而识别与音频信息相对应的文字,如果与音频信息相对应的文字中包括预先设置的唤醒词,可选的,唤醒词可以是:“请拍摄当前图像”或“请开启特效功能”等类型的词汇,则说明可以获取显示界面中的待处理图像。还有另一种实现方式为:可以预先将一些肢体动作设置为特效触发动作,当检测到视野范围内用户当前所做的肢体工作与预先设置的肢体动作一致时,则可以确定触发了特效操作,可选的,预设肢体动作可以为举手、张开嘴部或者转动头部等。
在实际应用过程中,可以基于终端设备的图像展示页面中任意选择,以实现待处理图像的获取,并在检测到确认控件或选中控件的触发时,确定触发了特效操作,并将当前时刻选中的图像作为待处理图像;也可以是在前期开发阶段预先存储多幅图像,当检测到用户触发特效操作时,可以直接中存储空间中导入至当前客户端;还可以是当检测到用户触发特效操作时,将用 户通过外接设备实时或周期性上传至当前客户端的图像作为待处理图像。
在实际应用过程中,可以基于终端设备显示界面中所展示的编辑框输入相应的文字,可以将此编辑框中输入的文字作为目标文字;也可以预先开发预语音采集控件,当检测到用户对语音采集控件的触发操作时,即可对用户的音频信息进行采集,并对采集的音频信息进行分析处理,从而识别出与音频信息相对应的文字,可以将识别得到的文字作为目标文字。
需要说明的是,在检测到特效触发操作时,当未检测到目标文字的输入时,可以仅获取待处理图像,并且后续仅基于待处理图像,实现目标特效图像的转换;相应的,当未检测到待处理图像的采集时,可以仅获取目标文字,以基于目标文字,确定目标特效图像;当既检测到目标文字的输入,有检测到待处理图像的采集时,可以同时基于目标文字和待处理图像,确定目标特效图像,本公开实施例对此不作具体限定。
S120、确定与特效选择信息相对应的至少一种待应用特效类型。
在本实施例中,待应用特效类型可以为用于对图像进行风格化特效处理的特效类型。可选的,待应用特效类型可以包括但不限于赛博朋克类型、毕加索画风类型、梵高画风类型、水墨画类型以及几何画类型等。
在实际应用中,在确定特效选择信息后,即可确定与特效选择信息相对应的待应用特效类型。
在实际应用过程中,与目标文字相对应的待应用特效类型的确定方式,以及与待处理图像相对应的待应用特效类型的确定方式是不同的,因此,在确定相应的待应用特效类型时,可以分别基于相应的确定方式进行处理。
可选的,确定与目标文字相对应的至少一种特效类型,可以是预先设置至少一个关键字段,并建立各关键字段与相应待应用特效类型之间的映射关系,当获取目标文字后,可以基于各关键字段对目标文字中所包含的各字段进行遍历,以确定与目标文字相对应的至少一个目标关键字段,并基于各目标关键字段与相应待应用特效类型之间的映射关系,确定与目标文字相对应的至少一个待应用特效类型。
可选的,确定与待处理图像相对应的至少一种待应用特效类型,可以是基于预先设置的算法对待处理图像进行图像内容解析,得到与待处理图像相对应的文本描述,并基于文本描述确定与待处理图像相对应的图像内容,以 基于图像内容确定待处理图像中所包含的场景,进一步的,基于预先构建的场景与待应用特效类型之间的映射关系,确定与待处理图像相对应的至少一种待应用特效类型。
需要说明的是,与目标文字相对应的至少一种待应用特效类型,以及与待处理图像相对应的至少一种待应用特效类型,可以是不同的特效类型,也可以是相同的特效类型。
还需说明的是,与目标文字相对应的待应用特效类型可以是一个或多个,当待应用特效类型为一个时,则可以基于此特效类型进行特效图像处理;若待应用特效类型为多个时,则可以在多个待应用特效类型中进行选择,以基于选定的待应用特效类型进行特效图像处理。
需要说明的是,为了可以使用户了解各待应用特效类型的类型名称以及直观地看到各待应用特效类型所对应特效显示效果,在确定出至少一种待应用特效类型后,还包括:将各待应用特效类型所对应的特效封面图和相应的文字描述对应显示于显示界面上。
在本实施例中,特效封面图可以为用于表征相应待应用特效类型的特效显示效果的图像。需要说明的是,可以预先将与各待选择特效类型的风格特征最相似的图像作为此待选择特效类型的特效封面图,并对应存储在存储空间中,以在从各待选择特效类型中确定出至少一种待应用特效类型时,可以分别调取与各待应用特效类型相对应的特效封面图,并显示于显示界面上。可选的,文字描述可以包括特效名称、特效类型以及特效介绍等。
在实际应用中,在确定出至少一种待应用特效类型后,可以调取与各待应用特效类型相对应的特效封面图,以及确定与各待应用特效类型相对应的文字描述,进一步的,将各特效封面图以及相应的文字描述按照预设排布规则对应显示在显示界面上。
需要说明的是,预设排布规则可以为预先设置的特效类型排布规则。可选的,预设排布规则可以包括随机、根据用户的历史数据确定或预先设定的默认排布规则。示例性的,预设排布规则可以包括列表式、平铺式以及环状式等。
S130、从至少一种待应用特效类型中,确定目标特效类型。
在本实施例中,在确定至少一种待应用特效类型之后,即可在各待应用 特效类型中进行筛选,以得到目标特效类型。其中,目标特效类型可以为最终应用的特效类型。示例性的,目标特效类型可以为赛博朋克类型,此时,可以使最终得到的特效图像与赛博朋克的图像风格相类似。
在实际应用中,从至少一种待应用特效类型中,确定目标特效类型的方式可以存在至少两种,一种方式可以为:基于对至少一个待应用特效类型的触发操作,确定目标特效类型。
在具体实施中,在得到至少一种待应用特效类型后,可以将各待应用特效类型展示在显示界面中,以使用户可以通过触发操作在多个待应用特效类型中进行选择,当检测到用户对至少一个待应用特效的触发操作,并基于确定控件下发确认指令时,可以将当前选择的至少一个待应用特效类型作为目标特效类型。
需要说明的是,当检测到用户对任一待应用特效类型进行触发时,可以将与此待应用特效类型相对应的特效封面图按照预设比例扩大,以将此待应用特效类型与其他未被触发的待应用特效类型区分开。
另一种方式可以为:若预设时长内未检测到对至少一个待应用特效类型的触发操作,则按照预设方式从至少一个待应用特效类型中选择出目标特效类型。
在本实施例中,预设时长可以为预先设置的选择时长。预设时长可以为任意值,可选的,可以为5秒。预设方式可以为预先设置的特效类型选择方式。其中,预设方式包括随机、根据目标用户的历史数据确定或预先设定默认特效类型。预先设定默认特效类型可以为任意特效类型,可选的,可以为赛博朋克特效类型。
在具体实施中,在得到至少一个待应用特效类型后,在将各待应用特效类型提供给用户的同时,还可以在显示界面中展示特效类型选择倒计时,倒计时的时间即为预先设置的选择时长。可以理解,用于可以通过触发操作在多个待应用特效类型中进行选择,当选择时长达到预设时长,即,特效类型选择倒计时归零时,在此区间内并未检测到对各待应用特效类型的触发操作时,可以按照预设方式从至少一个待应用特效类型中选择出目标特效类型。
需要说明的是,基于上述两种方式确定目标特效类型的好处在于:增强了用户在使用特效道具时的交互体验,满足了用户的个性化需求,同时,提 高了特效道具的智能性。
需要说明的是,可以通过对此特效道具中的默认选择参数进行自定义设置,来改变基于预设方式所确定的目标特效类型。
还需说明的是,为了可以提高此特效道具的特效处理效果,以及体现出特效处理过程的平滑过渡,在确定目标特效类型之后,还包括:播放转场动画,以基于转场动画显示目标特效图像。
在本实施例中,转场动画可以为预先设置的,用于表征场景与场景之间的过渡和转换的动画。示例性的,转场动画可以包括淡入淡出或出画入画等。在实际应用中,可以在前期开发阶段,预先开发多个转场动画的类型,用户可以通过对特效道具中关于转场动画的参数进行设置,来确定特效处理过程中所播放的转场动画,以便可以在确定目标特效类型后,可以播放相应的转场动画,从而基于转场动画显示目标特效图像。
需要说明的是,在特效处理过程中,为了可以使用户及时了解特效处理进程,在播放转场动画的过程中,还包括:在转场动画所对应的目标显示位置处,显示制作目标特效图像的制作进度条。
在本实施例中,制作进度条可以为用于表征目标特效图像的制作完成度百分比的图像。制作进度条可以为任意形状,可选的,可以为长条状、圆环状、节点状或者与目标特效类型相适配的形状等。需要说明的是,制作进度条的样式同样可以基于用户需求在特效道具的设置参数中进行设置,以满足用户的个性化需求。
在具体实施中,在播放转场动画的过程中,可以在转场动画所对应的目标显示位置处,显示用于表征目标特效图像完成情况的制作进度条。这样设置的好处在于:可以使用户对目标特效图像的处理进度以及可能需要的时间有一定的感知,避免出现应用程序无响应,而用户无感知的情况,提高了用户与界面的交互性,进而提升了用户体验。
S140、将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像。
在本实施例中,在确定目标特效类型后,即可将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像。其中,目标特效图像即为经过特效道具处理后,展示在显示界面中的特效图像。
可以理解的是,若在触发特效操作时,获取的是目标文字,则可以基于目标文字以及目标特效类型,确定目标特效图像;若在触发特效操作时,获取的是待处理图像,则可以基于待处理图像和目标特效类型,确定目标特效图像;若在触发特效操作时,获取的是目标文字和待处理图像,则可以基于目标文字、待处理图像以及目标特效类型,确定目标特效图像。
可选的,将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像,包括:确定与目标特效类型相关联的目标图像;将与目标文字相关联的关联图像和/或待处理图像,与目标图像融合处理,得到目标特效图像。
在本实施例中,目标图像可以预先存储的特效图像素材。示例性的,当目标特效类型为水墨画类型时,与其相关联的目标图像即为与水墨画类型相关联的图像,即采用水墨画绘画形式所画出的图像。在实际应用过程中,在确定多个待应用特效类型后,为各待应用特效类型分别设置相应的类型标识,同时,分别确定与各待应用特效类型相对应的至少一幅待应用图像,并建立类型标识与相应的待应用图像之间的关联关系,进一步的,将各待应用图像存储在图像素材库中,以在确定目标特效类型时,可以基于与目标特效类型相对应的标识,从图像素材库中调取相应的目标图像。
在本实施例中,与目标文字相关联的关联图像可以为基于目标文字中所包含的关键词所确定的图像。示例性的,当目标文字为“baby,a beautiful illustration concept art anime key visual trending pixiv fanbox by makoto shinkai and studio ghibli,visually stunning”,则其相关联的关联图像即为一幅包含婴儿的图像。
在本实施例中,可以基于预先设置的图像处理算法对关联图像、待处理图像以及目标图像进行融合处理,得到目标特效显示图像。其中,图像处理算法可以为颜色查找表(Look Up Table,LUT)。本领域技术人员应当理解,LUT的原理可以是通过一种颜色,查找其映射后的颜色,可以理解为一个函数LUT(R1,G1,B1),带R,G,B三个自变量的函数,输出为其对应映射后的值R2,G2,B2,从而可以达到改变画面的曝光与色彩的效果。
在具体实施中,在确定目标特效类型后,可以基于目标特效类型,调取与其相关联的目标图像,进一步的,若仅存在目标文字,则可以将与目标文 字相关联的关联图像与目标图像进行融合处理,即可得到将关联图像转换为与目标图像的画风相类似的目标特效图像;若仅存在待处理图像,则可以将待处理图像与目标图像进行融合处理,即可得到将待处理图像转换为与目标图像的画风相类似的目标特效图像;若目标文字和待处理图像均存在,则可将与目标文字相关联的关联图像、待处理图像以及目标图像进行融合处理,即可得到与目标图像的画风相类似的目标特效图像。这样设置的好处在于:提高了目标特效图像的特效显示效果,满足了用户的个性化需求,提升了用户的使用体验。
需要说明的是,在生成目标特效图像时,还可以预先对特效强度进行调整,以使最后生成的目标特效图像可以更加符合用户需求。示例性的,当特效强度设置为“0”时,则目标特效图像与待处理图像和/或关联图像相似度最高,并且,未体现目标图像的风格特征;当特效强度设置为“0.5”时,则目标特效图像与待处理图像和/或关联图像相似度适中,同时,体现出目标图像的风格特征;当特效强度设置为“1”时,则目标特效图像与待处理图像和/或关联图像相似度最低,同时,完全体现出目标图像的风格特征。
需要说明的是,为了可以使目标特效图像可以更加接近于目标特效类型所对应的特效显示效果,可以在生成目标特效图像之前,基于预先设置的参数对特效图像进行前处理,从而可以最终得到目标特效图像。
基于此,在得到目标特效图像之前,还包括:确定与目标特效类型相对应的滤镜参数,以基于滤镜参数确定目标特效图像。
在本实施例中,滤镜参数可以为与目标特效类型相对应的自定义参数。可选的,滤镜参数可以包括但不限于饱和度、对比度、清晰度、高光、阴影以及色调等。需要说明的是,对于各目标特效类型,均可以预先设置与其相匹配的滤镜参数,以在确定目标特效类型时,可以直接基于相应的滤镜参数,对需要处理的图像进行编辑,以得到目标特效图像。示例性的,当目标特效类型为水墨画类型时,其对应的滤镜参数可以为将饱和度设置为0;当目标特效类型为赛博朋克类型时,其对应的滤镜参数可以为将增强红蓝对比度,并增加高光。
本公开实施例的技术方案,通过响应于特效触发操作,确定特效选择信息,然后,确定与特效选择信息相对应的至少一种待应用特效类型,进一步 的,从至少一种待应用特效类型中,确定目标特效类型,最后,将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像,实现了基于图像、文字以及两者结合,确定相应的风格特效类型,进而,基于风格特效类型,将文字以及图像转换为目标特效图像的效果,提高了风格特效类型的确定精准度,进一步提高了目标特效图像的图像质量以及特效显示效果,同时,增强了用户在使用特效道具的交互性,进一步提升了用户的使用体验。
图2是本公开实施例所提供的一种视频处理方法流程示意图,在前述实施例的基础上,当响应于特效触发操作,仅获取目标文字时,可以基于目标文字,确定目标特效类型,并将目标文字转换为与目标特效类型相对应的目标特效图像,其具体的实施方式可以参见本实施例技术方案。其中,与上述实施例相同或者相应的技术术语在此不再赘述。
如图2所示,该方法具体包括如下步骤:
S210、响应于特效触发操作,获取目标文字。
在实际应用中,当检测到用户对特效控件的触发操作时,除了可以获取待处理图像,还可以获取目标文字,以使应用软件可以基于目标文字中所包含的信息对待处理图像进行处理。
可选的,确定特效选择信息,包括获取目标文字;获取目标文字,包括:于显示界面的目标区域展示文字编辑框,以在文字编辑框中编辑目标文字。
在本实施例中,目标区域可以为显示界面中的任意区域。文字编辑框可以为用于支持文本编辑的窗口。文本编辑框可以用于接收用户对文字的输入和编辑。除此之外,还可以实现删除、移动插入位置和选择文本等功能。
在实际应用中,可以预先开发文字编辑控件,当检测到用户对文字编辑控件的触发操作时,可以在显示界面的目标区域展示文字编辑框,以使用户可以在文字编辑框中输入或编辑目标文字;或者,当检测到用户触发特效操作时,可以直接在显示界面的目标区域展示文字编辑框,以便用户可以在此编辑框中编辑目标文字。这样设置的好处在于:提高了用户与显示界面的交互性,满足了用户的个性化需求,提升了用户体验。
S220、确定与目标文字相对应的至少一种待应用特效类型。
在本实施例中,在获取目标文字后,即可确定与目标文字相对应的至少一种待应用特效类型。其中,待应用特效类型可以为与目标文字中所包含的 各字段相匹配的特效类型。
可选的,确定与目标文字相对应的至少一种待应用特效类型,包括:对目标文字分词处理,以确定与目标文字相对应的至少一个关键词;基于至少一个关键词,从多个待选择特效类型中确定至少一个待应用特效类型。
在本实施例中,可以基于预设分词算法对目标文字进行分词处理,其中,预设分词算法可以为任意可以实现分词的算法,可选的,可以为自然语言处理算法。
在本实施例中,关键词可以为预先设置的,应用软件可以识别的词汇。可选的,与目标文字相对应的至少一个关键词包括对象类型、所属场景、所属风格类型以及所属环境中的至少一种。其中,对象类型可以为目标文字中所包含的需要进行特效处理的对象类型。可选的,对象类型可以包括人物、宠物、卡通人物、食物、花草植物以及建筑等。可选的,所属场景可以包括但不限于室内、夜景、街景以及日落等。所属风格类型可以为用户任意输入的风格化图像类型。可选的,所属风格类型可以包括但不限于油画类型、水墨画类型、漫画类型以及线条画类型等。所属环境可以包括但不限于山、湖、海以及天空等。示例性的,当目标文字为“A beautiful painting by vincent van gogh,Post Impressionism,oil on canvas,trending on art station,starry night”,则其对应的关键词包括所属风格类型“后印象派的布面油画风格”。
在本实施例中,可以预先设置多个关键词,并分别制作与各关键词相对应的特效类型,可以将这些特效类型作为待选择特效类型,进一步的,建立各关键词与相应待选择特效类型之间的关联关系,并将各待选择特效类型存储在预设存储空间中。
在实际应用中,当获取目标文字后,可以基于预设分词算法对目标文字进行分词处理,得到至少一个字段,基于预先设置的关键词对各字段进行遍历,以确定与目标文字相对应的至少一个关键词,进一步的,可以基于关键词与待选择特效类型之间的关联关系,从多个待选择特效类型中确定与目标文字相对应的至少一个待应用特效类型。这样设置的好处在于:提高了待应用特效类型的筛选准确性,满足了用户的个性化需求,同时,提高了特效道具的智能性。
需要说明的是,待应用特效类型可以为一个或多个。当待应用特效类型 为一个时,则可以将此特效类型作为目标特效类型,以基于此目标特效类型进行处理;当待应用特效类型为多个时,则可以基于用户需求在这些待应用特效类型中进行选择,以确定目标特效类型。
还需说明的是,当待应用特效类型为多个时,可以通过对目标文字进行再次编辑,在原有的基础上,新增或删减关键词,从而可以使得到的待应用特效类型可以更符合用户需求。
S230、从至少一种待应用特效类型中,确定目标特效类型。
S240、将目标文字转换为与目标特效类型相对应的目标特效图像。
在实际应用中,在得到目标特效类型后,可以确定与目标特效类型相对应的目标图像,同时,确定与目标文字相关联的关联图像,进一步的,将关联图像和目标图像进行融合处理,从而得到与目标特效类型相对应的目标特效图像。
本公开实施例的技术方案,通过响应于特效触发操作,获取目标文字,然后,确定与目标文字相对应的至少一种待应用特效类型,进一步的,从至少一种待应用特效类型中,确定目标特效类型,最后,将目标文字转换为与目标特效类型相对应的目标特效图像,实现了基于文字中的关键词,确定相应风格化特效类型,进而,将文字转换为相应目标特效图像的效果,满足了用户的个性化需求,增强了用于在使用特效道具时的交互性,提升了用户体验。
图3是本公开实施例所提供的一种视频处理方法流程示意图,在前述实施例的基础上,当响应于特效触发操作,仅获取待处理图像时,可以基于待处理图像,确定目标特效类型,并将待处理图像转换为与目标特效类型相对应的目标特效图像,其具体的实施方式可以参见本实施例技术方案。其中,与上述实施例相同或者相应的技术术语在此不再赘述。
如图3所示,该方法具体包括如下步骤:
S310、响应于特效触发操作,获取待处理图像。
在本实施例中,获取待处理图像可以包括至少两种方式。一种方式可以为:基于存储空间中预先存储的若干个图像进行选择,以得到待处理图像。可选的,在显示界面上展示图像上传控件;当检测到对图像上传控件的触发操作时,跳转至目标图像库,以从目标图像库中确定待处理图像。
在本实施例中,图像上传控件可以是在前期开发阶段预先设置的,用于执行图像上传功能的控件。需要说明的是,图像上传控件可以设置在显示界面中的任意区域,本公开实施例对此不作具体限定。目标图像库可以为用于存储图像素材的存储空间。目标图像库中所包含的图像可以包括开发人员预先存储的系统默认图像,也可以包括用户在应用过程中后续添加的自定义图像等。
在具体实施中,可以预先设置图像上传控件并展示在显示界面中,当检测到用户触发特效操作时,可以在显示界面中展示图像上传控件,当检测到用户对图像上传控件的触发操作时,可以在显示界面中弹出目标图像库展示页面,或者,从显示界面跳转至目标图像展示页面中,该显示页面中可以展示多个待选择图像,当检测到用户对其中任意待选择图像的触发操作时,则可以将该待选择图像作为待处理图像。
可选的,另一种实现方式可以为:在预设时长内未检测到对图像上传控件的触发操作时,从采集的至少一个视频帧中确定待处理图像。
在本实施例中,预设时长可以为预先设置的选择时长。预设时长可以为任意值,可选的,可以为3秒。
在实际应用中,在检测到用户触发特效操作时,终端设备可以开启拍摄功能以实现待处理图像的获取,同时,显示界面中展示图像选择倒计时,倒计时时间即为预先设置的选择时长。可以理解的是,在终端设备开启拍摄功能的同时,显示界面上会展示图像上传控件,当等待时长达到预设时长,即,图像选择倒计时归零时,未检测到用户对图像上传控件的触发操作时,可以在基于终端设备采集的至少一个视频帧中确定待处理图像。这样设置的好处在于:增强了待处理图像获取方式的灵活性和多样性,同时,提高了用户与显示界面的交互性,进而提升了用户体验。
需要说明的是,从采集的至少一个视频帧中确定待处理图像可以包括至少两种方式,一种实现方式可以为:当倒计时结束时,终端设备在这一时刻所采集的视频帧作为待处理图像。可选的,从采集的至少一个视频帧中确定待处理图像,包括:将倒计时结束时所采集的视频帧作为待处理图像。
在实际应用中,当在预设时长内未检测到用户对图像上传控件的触发操作时,此时,显示界面中所展示的倒计时归零,可以将终端设备在当前时刻 所采集的视频帧作为待处理图像。
另一种实现方式可以为:显示预设时长内采集的至少一个视频帧,并基于对至少一个视频帧的触发操作确定待处理图像。
在实际应用中,当在预设时长内未检测到用户对图像上传控件的触发操作时,可以基于预先设定的程序对终端设备在预设时长内所拍摄的视频进行处理,得到至少一个视频帧,并展示在显示界面中,用户可以通过触发操作在多个视频帧中进行选择,当检测到对其中一个视频帧的触发操作时,可以将用户当前选择的视频帧作为待处理图像。这样设置的好处在于:可以增强待处理图像确定方式的多样性,同时,提高了用户与显示界面的交互性,满足了用户的个性化需求,进而提升了用户体验。
S320、确定待处理图像相对应的至少一种待应用特效类型。
在本实施例中,在获取待处理图像后,即可确定与待处理图像相对应的至少一种待应用特效类型。其中,待应用特效类型可以为与待处理图像中的图像内容相适配的特效类型。
在实际应用过程中,可以预先构建图像内容与待选择特效类型之间的映射关系,即,确定与各图像内容最相适配的至少一种待选择特效类型,以在得到待处理图像之后,可以对其图像内容进行分析,从而确定与待处理图像相对应的至少一种待应用特效类型。示例性的,当待处理图像为一幅风景画时,与其相对应的待应用特效类型可以包括水墨画类型或油画类型等;当待处理图像为一幅人像时,与其相对应的待应用特效类型可以包括日漫类型、油画类型以及像素风类型等;当待处理图像为一幅包含宠物的图像时,与其相对应的待应用特效类型可以为抽象派画风类型。
可选的,确定待处理图像相对应的至少一种待应用特效类型,包括:确定待处理图像的图像内容;根据图像内容和预先建立的映射关系,从至少一个待选择特效类型中确定至少一种待应用特效类型。
在本实施例中,图像内容可以为对待处理图像中所包含的对象、场景以及环境的描述。可选的,图像内容可以包括下述至少一种:对象类型、所属场景、所属风格类型以及所属环境。其中,对象类型可以为待处理图像中所包含的对象所属种类。可选的,对象类型可以包括人物、宠物、风景以及建筑等。需要说明的是,待处理图像中所包含的对象可以为一个或多个;当待 处理图像中的对象为一个时,则可以确定与此对象类型相对应的待应用特效类型;当待处理图像中的对象为多个,且对应多个对象类型时,则可以确定与这些对象的对象类型均适配的至少一种待应用特效类型。可选的,所属场景可以包括但不限于室内、夜景、街景以及日落等。所属风格类型可以为与待处理图像相对应的风格类型。可选的,所属风格类型可以包括但不限于油画类型、水墨画类型、漫画类型以及线条画类型等。所属环境可以包括但不限于山、湖、海以及天空等。
在本实施例中,映射关系可以为预先构建的,图像内容与待选择特效类型之间的映射关系。其中,映射关系中包括各图像内容和相应的至少一个待选择特效类型。
在具体实施中,在得到待处理图像后,为了可以匹配出与待处理图像相适配的至少一种待应用特效类型,可以基于预先设置的算法对待处理图像进行图像处理,确定与待处理图像相对应的图像内容,进一步的,对图像内容进行分析,并根据预先建立的映射关系,从多个待选择特效类型中确定与图像内容相适配的至少一种待应用特效类型,从而最终得到与待处理图像相对应的至少一种待应用特效类型。这样设置的好处在于:提高了特效道具的智能性以及个性化适配性,降低了目标特效图像的错误率,提升了用户体验。
S330、从至少一种待应用特效类型中,确定目标特效类型。
S340、将待处理图像转换为与目标特效类型相对应的目标特效图像。
在实际应用中,在得到目标特效类型后,可以确定与目标特效类型相对应的目标图像,进一步的,将待处理图像与目标图像进行融合处理,从而得到与目标特效类型相对应的目标特效图像。
本公开实施例的技术方案,通过响应于特效触发操作,获取待处理图像,然后,确定与待处理图像相对应的至少一种待应用特效类型,进一步的,从至少一种待应用特效类型中,确定目标特效类型,最后,将待处理图像转换为与目标特效类型相对应的目标特效图像,实现了基于图像内容,确定相应风格化特效类型,进而,将图像转换为相应目标特效图像的效果,提高了特效道具的智能性,有效提高了目标特效图像的显示效果。
图4是本公开实施例所提供的一种视频处理方法流程示意图,在前述实施例的基础上,当响应于特效触发操作,既获取目标文字,又获取待处理图 像时,可以同时基于目标文字和待处理图像,确定目标特效类型,并将目标文字和待处理图像转换为与目标特效类型相对应的目标特效图像,其具体的实施方式可以参见本实施例技术方案。其中,与上述实施例相同或者相应的技术术语在此不再赘述。
如图4所示,该方法具体包括如下步骤:
S410、响应于特效触发操作,获取目标文字和待处理图像。
需要说明的是,目标文字和待处理图像的获取方式与前述实施例所描述的方式相同,本步骤在此不再具体赘述。
S420、确定与目标文字和待处理图像相对应的至少一种待应用特效类型。
在本实施例中,在得到目标文字和待处理图像之后,即可确定与目标文字和待处理图像相对应的至少一种待应用特效类型。可选的,待应用特效类型可以包括与目标文字相对应的至少一种特效类型,以及与待处理图像相对应的至少一种特效类型;或者,同时与目标文字和待处理图像相对应的至少一种特效类型等,本公开实施例对此不作具体限定。
在实际应用中,当既获取目标文字,又获取待处理图像时,在确定待应用特效类型时,可以首先确定与目标文字相对应的至少一种特效类型,以及与待处理图像相对应的至少一种特效类型,进一步的,可以通过对这些特效类型取并集或者交集,并将最终得到的集合作为与至少一种待应用特效类型相对应的集合,下面可以分别对并集处理以及交集处理的实现方式进行详细说明。
可选的,在并集处理时,其对应的实现方式可以为:确定与目标文字相对应的第一特效类型,以及与待处理图像相对应的第二特效类型;确定包括第一特效类型和第二特效类型的并集,得到至少一种待应用特效类型。
在本实施例中,第一特效类型可以为通过对目标文字中所包含的关键词进行分析后确定的特效类型。第二特效类型可以为通过对待处理图像中的图像内容进行分析后确定的特效类型。需要说明的是,第一特效类型和第二特效类型的数量均可以为一个或多个。
在具体实施中,在得到目标文字和待处理图像之后,可以首先基于目标文字中所包含的关键词,确定与目标文字相对应的第一特效类型,同时,基于待处理图像的图像内容,确定与待处理图像相对应的第二特效类型,进一 步的,将第一特效类型和第二特效类型进行合并,得到包含第一特效类型和第二特效类型的并集,并将此并集作为至少一种待应用特效类型所对应的集合,从而得到与目标文字和待处理图像相对应的至少一种待应用特效类型。
可选的,在进行交集处理时,其对应的实现方式可以为:确定与目标文字相对应的第一特效类型,以及与待处理图像相对应的第二特效类型;确定第一特效类型和第二特效类型的交集,得到至少一种待应用特效类型。
在实际应用中,在得到与目标文字相对应的第一特效类型,以及与待处理图像相对应的第二特效类型后,可以对第一特效类型和第二特效类型进行取交集处理,具体来说,确定第一特效类型与第二特效类型相互重合的至少一种特效类型,并基于这些特效类型,构建相应的交集,进而,将此交集作为至少一种待应用特效类型所对应的集合,从而得到与目标文字和待处理图像相对应的至少一种待应用特效类型。
需要说明的是,基于上述两种方式确定至少一种待应用特效类型的好处在于:增强了待应用特效类型确定方式的灵活性和多样性,提高了特效道具的智能性,进而,提高了目标特效图像的丰富性和趣味性,提升了用户的使用体验。
S430、从至少一种待应用特效类型中,确定目标特效类型。
S440、将目标文字和待处理图像转换为与目标特效类型相对应的目标特效图像。
在实际应用中,在得到目标特效类型后,可以确定与目标特效类型相对应的目标图像,同时,确定与目标文字相关联的关联图像,进一步的,将关联图像、待处理图像和目标图像进行融合处理,从而得到与目标特效类型相对应的目标特效图像。
本公开实施例的技术方案,通过响应于特效触发操作,获取目标文字和待处理图像,然后,确定与目标文字和/或待处理图像相对应的至少一种待应用特效类型,进一步的,从至少一种待应用特效类型中,确定目标特效类型,最后,将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像,实现了同时基于文字和图像,确定相应风格化特效类型,进而,将文字和图像转换为相应目标特效图像的效果,提高了风格化特效类型的确定精准度,进一步提高了目标特效图像的图像质量以及特效显示效果,同时,增 强了用户在使用特效道具的交互性,进一步提升了用户的使用体验。
图5是本公开实施例所提供的一种视频处理装置结构示意图,如图5所示,所述装置包括:特效触发操作响应模块510、待应用特效类型确定模块520、目标特效类型确定模块530以及目标特效图像确定模块540。
其中,特效触发操作响应模块510,用于响应于特效触发操作,确定特效选择信息;其中,所述特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像;
待应用特效类型确定模块520,用于确定与所述特效选择信息相对应的至少一种待应用特效类型;
目标特效类型确定模块530,用于从所述至少一种待应用特效类型中,确定目标特效类型;
目标特效图像确定模块540,用于将所述目标文字和/或待处理图像转换为与所述目标特效类型相对应的目标特效图像。
在上述各技术方案的基础上,特效触发操作响应模块510包括:待处理图像获取子模块。待处理图像获取子模块包括:控件展示单元、待处理图像第一确定单元以及待处理图像第二确定单元。
控件展示单元,用于在显示界面上展示图像上传控件;
待处理图像第一确定单元,用于当检测到对所述图像上传控件的触发操作时,跳转至目标图像库,以从所述目标图像库中确定所述待处理图像;或,
待处理图像第二确定单元,用于在预设时长内未检测到对所述图像上传控件的触发操作时,从采集的至少一个视频帧中确定所述待处理图像。
在上述各技术方案的基础上,待处理图像第二确定单元包括:待处理图像第一确定子单元和待处理图像第二确定子单元。
待处理图像第一确定子单元,用于将倒计时结束时所采集的视频帧作为待处理图像;或,
待处理图像第二确定子单元,用于显示所述预设时长内采集的至少一个视频帧,并基于对所述至少一个视频帧的触发操作确定所述待处理图像。
在上述各技术方案的基础上,特效触发操作响应模块510包括:目标文字获取子模块。
目标文字获取子模块,用于显示界面的目标区域展示文字编辑框,以在 所述文字编辑框中编辑所述目标文字。
在上述各技术方案的基础上,特效触发操作响应模块510包括:图像输入特征确定子模块。
图像输入特征确定子模块,用于基于调取的摄像头为前置摄像头或后置摄像头来确定图像输入特征。
在上述各技术方案的基础上,所述特效选择信息包括目标文字,待应用特效类型确定模块520包括:目标文字处理单元和待应用特效类型确定单元。
目标文字处理单元,用于对所述目标文字分词处理,以确定与所述目标文字相对应的至少一个关键词;
待应用特效类型第一确定单元,用于基于所述至少一个关键词,从多个待选择特效类型中确定所述至少一个待应用特效类型。
在上述各技术方案的基础上,所述特效选择信息包括待处理图像,待应用特效类型确定模块520还包括:图像内容确定单元和待应用特效类型第二确定单元。
图像内容确定单元,用于确定所述待处理图像的图像内容;
待应用特效类型第二确定单元,用于根据所述图像内容和预先建立的映射关系,从至少一个待选择特效类型中确定所述至少一种待应用特效类型;
其中,所述映射关系中包括各图像内容和相应的至少一个待选择特效类型。
在上述各技术方案的基础上,所述特效选择信息包括待处理图像和目标文字,待应用特效类型确定模块520还包括:特效类型确定单元、并集确定单元以及交集确定单元。
特效类型确定单元,确定与所述目标文字相对应的第一特效类型,以及与所述待处理图像相对应的第二特效类型;
并集确定单元,用于确定包括第一特效类型和所述第二特效类型的并集,得到所述至少一种待应用特效类型;或,
交集确定单元,用于确定所述第一特效类型和所述第二特效类型的交集,得到所述至少一种待应用特效类型。
在上述各技术方案的基础上,所述装置还包括:特效封面图显示模块。
特效封面图显示模块,用于在确定出所述至少一种待应用特效类型之后, 将各待应用特效类型所对应的特效封面图和相应的文字描述对应显示于显示界面上。
在上述各技术方案的基础上,目标特效类型确定模块530包括:目标特效类型第一确定单元和目标特效类型第二确定单元。
目标特效类型第一确定单元,用于基于对所述至少一个待应用特效类型的触发操作,确定所述目标特效类型;或,
目标特效类型第二确定单元,用于若预设时长内未检测到对至少一个待应用特效类型的触发操作,则按照预设方式从所述至少一个待应用特效类型中选择出所述目标特效类型;
其中,所述预设方式包括随机、根据目标用户的历史数据确定或预先设定默认特效类型。
在上述各技术方案的基础上,所述装置还包括:转场动画播放模块。
转场动画播放模块,用于在确定目标特效类型之后,播放转场动画,以基于所述转场动画显示所述目标特效图像。
在上述各技术方案的基础上,所述装置还包括:制作进度条显示模块。
制作进度条显示模块,用于在播放转场动画的过程中,在所述转场动画所对应的目标显示位置处,显示制作所述目标特效图像的制作进度条。
在上述各技术方案的基础上,目标特效图像确定模块540包括:目标图像确定单元和图像融合处理单元。
目标图像确定单元,用于确定与所述目标特效类型相关联的目标图像;
图像融合处理单元,用于将与所述目标文字相关联的关联图像和/或所述待处理图像,与所述目标图像融合处理,得到目标特效图像。
在上述各技术方案的基础上,所述装置还包括:滤镜参数确定模块。
滤镜参数确定模块,用于在所述将与所述目标文字相关联的关联图像和/或所述待处理图像,与所述目标图像融合处理,得到目标特效图像之前,确定与所述目标特效类型相对应的滤镜参数,以基于所述滤镜参数确定所述目标特效图像。
在上述各技术方案的基础上,所述待处理图像的图像内容和/或所述目标文字的关键词包括下述至少一种:
对象类型、所属场景、所属风格类型以及所属环境。
本公开实施例的技术方案,通过响应于特效触发操作,确定特效选择信息,然后,确定与特效选择信息相对应的至少一种待应用特效类型,进一步的,从至少一种待应用特效类型中,确定目标特效类型,最后,将目标文字和/或待处理图像转换为与目标特效类型相对应的目标特效图像,实现了基于图像、文字以及两者结合,确定相应的风格特效类型,进而,基于风格特效类型,将文字以及图像转换为目标特效图像的效果,提高了风格特效类型的确定精准度,进一步提高了目标特效图像的图像质量以及特效显示效果,同时,增强了用户在使用特效道具的交互性,进一步提升了用户的使用体验。
本公开实施例所提供的视频处理装置可执行本公开任意实施例所提供的视频处理方法,具备执行方法相应的功能模块和有益效果。
值得注意的是,上述装置所包括的各个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本公开实施例的保护范围。
图6是本公开实施例所提供的一种电子设备的结构示意图。下面参考图6,其示出了适于用来实现本公开实施例的电子设备(例如图6中的终端设备或服务器)600的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。编辑/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如 液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
本公开实施例提供的电子设备与上述实施例提供的视频处理方法属于同一发明构思,未在本实施例中详尽描述的技术细节可参见上述实施例,并且本实施例与上述实施例具有相同的有益效果。
本公开实施例提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述实施例所提供的视频处理方法。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载 了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:
响应于特效触发操作,确定特效选择信息;其中,所述特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像;
确定与所述特效选择信息相对应的至少一种待应用特效类型;
从所述至少一种待应用特效类型中,确定目标特效类型;
将所述目标文字和/或待处理图像转换为与所述目标特效类型相对应的目标特效图像。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户 计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD- ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (18)

  1. 一种视频处理方法,包括:
    响应于特效触发操作,确定特效选择信息;其中,所述特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像;
    确定与所述特效选择信息相对应的至少一种待应用特效类型;
    从所述至少一种待应用特效类型中,确定目标特效类型;
    将所述目标文字和/或所述待处理图像转换为与所述目标特效类型相对应的目标特效图像。
  2. 根据权利要求1所述的方法,其中,所述确定特效选择信息,包括:
    获取所述待处理图像;
    所述获取所述待处理图像,包括:
    在显示界面上展示图像上传控件;
    当检测到对所述图像上传控件的触发操作时,跳转至目标图像库,以从所述目标图像库中确定所述待处理图像;或,
    在预设时长内未检测到对所述图像上传控件的触发操作时,从采集的至少一个视频帧中确定所述待处理图像。
  3. 根据权利要求2所述的方法,其中,所述从采集的至少一个视频帧中确定所述待处理图像,包括:
    将倒计时结束时所采集的视频帧作为待处理图像;或,
    显示所述预设时长内采集的至少一个视频帧,并基于对所述至少一个视频帧的触发操作确定所述待处理图像。
  4. 根据权利要求1-3任一所述的方法,其中,所述确定特效选择信息,包括获取所述目标文字;
    所述获取所述目标文字,包括:
    于显示界面的目标区域展示文字编辑框,以在所述文字编辑框中编辑所述目标文字。
  5. 根据权利要求1-3任一所述的方法,其中,所述确定特效选择信息,包括确定所述图像输入特征;
    所述确定所述图像输入特征,包括:
    基于调取的摄像头为前置摄像头或后置摄像头来确定所述图像输入特征。
  6. 根据权利要求1-5任一所述的方法,其中,所述特效选择信息包括所述目标文字,所述确定与所述特效选择信息相对应的至少一种待应用特效类型,包括:
    对所述目标文字分词处理,以确定与所述目标文字相对应的至少一个关键词;
    基于所述至少一个关键词,从多个待选择特效类型中确定所述至少一种待应用特效类型。
  7. 根据权利要求1-5任一所述的方法,其中,所述特效选择信息包括所述待处理图像,所述确定与所述特效选择信息相对应的至少一种待应用特效类型,包括:
    确定所述待处理图像的图像内容;
    根据所述图像内容和预先建立的映射关系,从至少一个待选择特效类型中确定所述至少一种待应用特效类型;
    其中,所述映射关系中包括各图像内容和相应的至少一个待选择特效类型。
  8. 根据权利要求1-5任一所述的方法,其特征在于,所述特效选择信息包括所述待处理图像和所述目标文字,所述确定与所述特效选择信息相对应的至少一种待应用特效类型,包括:
    确定与所述目标文字相对应的第一特效类型,以及与所述待处理图像相对应的第二特效类型;
    确定包括所述第一特效类型和所述第二特效类型的并集,得到所述至少一种待应用特效类型;或,
    确定所述第一特效类型和所述第二特效类型的交集,得到所述至少一种待应用特效类型。
  9. 根据权利要求1-8任一所述的方法,其中,在所述确定与所述特效选择信息相对应的至少一种待应用特效类型之后,所述方法还包括:
    将各待应用特效类型所对应的特效封面图和相应的文字描述对应显示于显示界面上。
  10. 根据权利要求1-9任一所述的方法,其中,所述从所述至少一种待应用特效类型中,确定目标特效类型,包括:
    基于对所述至少一种待应用特效类型的触发操作,确定所述目标特效类型;或,
    若预设时长内未检测到对至少一种待应用特效类型的触发操作,则按照预设方式从所述至少一种待应用特效类型中选择出所述目标特效类型;
    其中,所述预设方式包括随机、根据目标用户的历史数据确定或预先设定默认特效类型。
  11. 根据权利要求1-10任一所述的方法,其中,在所述确定目标特效类型之后,所述方法还包括:
    播放转场动画,以基于所述转场动画显示所述目标特效图像。
  12. 根据权利要求11所述的方法,其中,在所述播放转场动画的过程中,所述方法还包括:
    在所述转场动画所对应的目标显示位置处,显示制作所述目标特效图像的制作进度条。
  13. 根据权利要求1-11任一所述的方法,其中,所述将所述目标文字和/或待处理图像转换为与所述目标特效类型相对应的目标特效图像,包括:
    确定与所述目标特效类型相关联的目标图像;
    将与所述目标文字相关联的关联图像和/或所述待处理图像,与所述目标图像融合处理,得到所述目标特效图像。
  14. 根据权利要求13所述的方法,其中,在所述将与所述目标文字相关联的关联图像和/或所述待处理图像,与所述目标图像融合处理,得到所述目标特效图像之前,所述方法还包括:
    确定与所述目标特效类型相对应的滤镜参数,以基于所述滤镜参数确定所述目标特效图像。
  15. 根据权利要求1-14任一所述的方法,其中,所述待处理图像的图像内容和/或所述目标文字的关键词包括以下至少一种:
    对象类型、所属场景、所属风格类型以及所属环境。
  16. 一种视频处理装置,包括:
    特效触发操作响应模块,被配置为响应于特效触发操作,确定特效选择 信息;其中,所述特效选择信息至少包括以下信息的一种:目标文字、图像输入特征和待处理图像;
    待应用特效类型确定模块,被配置为确定与所述特效选择信息相对应的至少一种待应用特效类型;
    目标特效类型确定模块,被配置为从所述至少一种待应用特效类型中,确定目标特效类型;以及
    目标特效图像确定模块,被配置为将所述目标文字和/或待处理图像转换为与所述目标特效类型相对应的目标特效图像。
  17. 一种电子设备,包括:
    一个或多个处理器;以及
    存储装置,被配置为存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-15中任一所述的视频处理方法。
  18. 一种包含计算机可执行指令的存储介质,其中,所述计算机可执行指令在由计算机处理器执行时用于执行如权利要求1-15中任一所述的视频处理方法。
PCT/CN2023/130439 2022-11-09 2023-11-08 视频处理方法、装置、电子设备及存储介质 WO2024099353A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211401216.X 2022-11-09
CN202211401216.XA CN118018664A (zh) 2022-11-09 2022-11-09 视频处理方法、装置、电子设备及存储介质

Publications (1)

Publication Number Publication Date
WO2024099353A1 true WO2024099353A1 (zh) 2024-05-16

Family

ID=90927606

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/130439 WO2024099353A1 (zh) 2022-11-09 2023-11-08 视频处理方法、装置、电子设备及存储介质

Country Status (3)

Country Link
US (1) US20240152261A1 (zh)
CN (1) CN118018664A (zh)
WO (1) WO2024099353A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011119786A (ja) * 2009-11-30 2011-06-16 Toshiba Corp 情報処理装置およびコンテンツ表示制御方法
CN104703043A (zh) * 2015-03-26 2015-06-10 努比亚技术有限公司 一种添加视频特效的方法和装置
CN107944397A (zh) * 2017-11-27 2018-04-20 腾讯音乐娱乐科技(深圳)有限公司 视频录制方法、装置及计算机可读存储介质
CN110865754A (zh) * 2019-11-11 2020-03-06 北京达佳互联信息技术有限公司 信息展示方法、装置及终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011119786A (ja) * 2009-11-30 2011-06-16 Toshiba Corp 情報処理装置およびコンテンツ表示制御方法
CN104703043A (zh) * 2015-03-26 2015-06-10 努比亚技术有限公司 一种添加视频特效的方法和装置
CN107944397A (zh) * 2017-11-27 2018-04-20 腾讯音乐娱乐科技(深圳)有限公司 视频录制方法、装置及计算机可读存储介质
CN110865754A (zh) * 2019-11-11 2020-03-06 北京达佳互联信息技术有限公司 信息展示方法、装置及终端

Also Published As

Publication number Publication date
US20240152261A1 (en) 2024-05-09
CN118018664A (zh) 2024-05-10

Similar Documents

Publication Publication Date Title
CN112073649B (zh) 多媒体数据的处理方法、生成方法及相关设备
US11412153B2 (en) Model-based method for capturing images, terminal, and storage medium
CN111294663B (zh) 弹幕处理方法、装置、电子设备及计算机可读存储介质
CN109168026B (zh) 即时视频显示方法、装置、终端设备及存储介质
US20240184438A1 (en) Interactive content generation method and apparatus, and storage medium and electronic device
WO2019227429A1 (zh) 多媒体内容生成方法、装置和设备/终端/服务器
CN114331820A (zh) 图像处理方法、装置、电子设备及存储介质
WO2022171024A1 (zh) 图像显示方法、装置、设备及介质
US20230317117A1 (en) Video generation method and apparatus, device, and storage medium
WO2024104423A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2024104333A1 (zh) 演播画面的处理方法、装置、电子设备及存储介质
WO2024001802A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN108876866B (zh) 一种媒体数据处理方法、装置及存储介质
WO2024099353A1 (zh) 视频处理方法、装置、电子设备及存储介质
WO2023024803A1 (zh) 动态封面生成方法、装置、电子设备、介质及程序产品
CN110971958A (zh) 直播礼物横幅逐帧动画展示方法、存储介质、设备及系统
CN115379136A (zh) 特效道具处理方法、装置、电子设备及存储介质
CN116847147A (zh) 特效视频确定方法、装置、电子设备及存储介质
CN112017261B (zh) 贴纸生成方法、装置、电子设备及计算机可读存储介质
WO2024078409A1 (zh) 图像预览方法、装置、电子设备及存储介质
US20230222717A1 (en) Method for generating a special effect prop, method for processing an image, electronic device, and storage medium
CN111726545B (zh) 素材文件处理方法、装置、计算机设备及存储介质
CN115278306B (zh) 视频剪辑方法及装置
EP4354885A1 (en) Video generation method and apparatus, device, storage medium, and program product
WO2024123244A1 (zh) 文本视频生成方法、装置、电子设备及存储介质