Media data processing method and device, equipment, medium and program product
By displaying the media data to be stylized and the candidate stylized material set in the target interactive interface, the media data is stylized, and the edit control set is displayed in the interactive interface to adjust the image content of the stylized data, the problem of poor local stylization effect in the prior art is solved, and richer picture effects and better interactive experience are achieved.
Patent Information
- Application Number
- CN202510138403.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-05-09
AI Technical Summary
The lack of effective intelligent local stylization methods in the prior art leads to poor stylization effects of images or videos.
By displaying the media data to be stylized and the candidate stylized material set in the target interactive interface, stylized the media data in response to the trigger operation of the target stylized material, obtain the stylized data, and display the edit control set in the interactive interface to adjust the image content of the stylized data.
It realizes local stylized data with richer picture effects, optimizes local stylized methods, and improves picture effects and interactive experience.
Smart Images

Figure CN119967219A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to computer technology, and more particularly to a media data processing method, apparatus, device, medium, and program product. Background Art
[0002] Image stylization is to apply a specific artistic style to an image or video, so that the image or video presents a specific artistic effect visually. Local stylization is to embed some real-world images on the basis of the stylized picture effect of the image or video, creating a visual contrast of the blending of reality and virtuality, and improving the interest of the picture. However, there is currently no effective intelligent local stylization method. Summary of the invention
[0003] The embodiments of the present disclosure provide a media data processing method, apparatus, device, medium and program product, which can optimize the local stylization method and improve the picture effect.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for processing media data, including:
[0005] Displaying the media data to be stylized and the candidate stylized material set in the target interactive interface, wherein the candidate stylized material set includes the target stylized material;
[0006] In response to a triggering operation of the target stylized material, stylizing the media data based on the target stylized material to obtain stylized data corresponding to the media data, and displaying the stylized data in the target interactive interface, wherein at least a portion of the image area in the stylized data is a stylized area;
[0007] An editing control set is displayed in the target interaction interface, image content of the stylized data is adjusted in response to an interactive operation of the editing control set, and the adjustment result of the stylized data is displayed in the target interaction interface.
[0008] In a second aspect, an embodiment of the present disclosure further provides a media data processing device, including:
[0009] A display module, used to display the media data to be stylized and the candidate stylized material set in the target interactive interface, wherein the candidate stylized material set includes the target stylized material;
[0010] a stylization module, configured to respond to a triggering operation of the target stylized material, perform stylization processing on the media data based on the target stylized material, obtain stylized data corresponding to the media data, and display the stylized data in the target interactive interface, wherein at least a portion of the image area in the stylized data is a stylized area;
[0011] The editing module is used to display the editing control set in the target interactive interface, adjust the image content of the stylized data in response to the interactive operation of the editing control set, and display the adjustment result of the stylized data in the target interactive interface.
[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0013] one or more processors;
[0014] a storage device for storing one or more programs,
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the media data processing method as described in any embodiment of the present disclosure.
[0016] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the media data processing method as described in any embodiment of the present disclosure.
[0017] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the media data processing method as described in any embodiment of the present disclosure.
[0018] The disclosed embodiments provide a method for processing media data, which performs stylized processing on media data through target stylized materials to obtain stylized data, adjusts image content of the stylized data in response to editing operations on the stylized data, and displays the adjusted results of the stylized data in a target interactive interface, thereby obtaining local stylized data with richer picture effects, optimizing the local stylization method, and improving the picture effects and interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0020] Figure 1 A flowchart of a media data processing method provided by an embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of a target interaction interface provided by an embodiment of the present disclosure;
[0022] Figure 3 A schematic diagram of another target interaction interface provided by an embodiment of the present disclosure;
[0023] Figure 4 A flowchart of another media data processing method provided by an embodiment of the present disclosure;
[0024] Figure 5 It is a local stylized image with overlapping portrait contours;
[0025] Figure 6 A comparison chart of the effects of the background stylized image provided by the embodiment of the present disclosure;
[0026] Figure 7 A schematic diagram of a process of background stylization in a media data processing method provided by an embodiment of the present disclosure;
[0027] Figure 8 A schematic diagram of the process of object stylization in a media data processing method provided by an embodiment of the present disclosure;
[0028] Fig. 9 A schematic diagram of the structure of a media data processing device provided by an embodiment of the present disclosure;
[0029] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0031] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0032] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0033] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0035] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0036] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0037] For example, in response to receiving an active request from a user, 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. Thus, 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.
[0038] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, 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.
[0039] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0040] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0041] Figure 1This is a flow chart of a media data processing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of image special effects processing, for example, the scene of local stylization of an image. The method can be executed by a media data 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.
[0042] like Figure 1 As shown, the method includes:
[0043] S110: Displaying the media data to be stylized and a set of candidate stylized materials in a target interactive interface, wherein the set of candidate stylized materials includes a target stylized material.
[0044] Among them, the target interactive interface can be an editing interface of a media data editing tool. The media data to be stylized refers to pictures, photos or videos to be locally stylized. For example, the media data to be stylized can be photos or videos taken by a terminal device. Alternatively, the data to be stylized can be pictures, photos or videos stored on a terminal device. The candidate stylized material set includes multiple candidate stylized materials. For example, the candidate stylized materials include stylized templates of at least one style such as oil painting style, comic style, clay style, etc. Among them, the candidate stylized material set includes target stylized materials. The target stylized material refers to the selected candidate stylized material. The target stylized material can be selected through interactive operations on the candidate stylized material set.
[0045] Exemplarily, in response to a data import operation in a target interaction interface, the media data to be stylized is acquired, and the media data to be stylized and the candidate stylized material set are displayed in the target interaction interface.
[0046] Optionally, the target interactive interface includes a preview area and a material area. The media data to be stylized is displayed in the preview area. The candidate stylized materials in the candidate stylized material set are displayed in the material area.
[0047] In the embodiment of the present disclosure, in response to a click operation on a local stylization option, a target interaction interface is displayed. A data import control is displayed in the target interaction interface. In response to a click operation on a data import control, a shooting option and an import option are displayed. In response to a click operation on a shooting option, a photo or video is taken by a camera of a terminal device as media data to be stylized, and the taken photo or video is displayed in the target interaction interface.
[0048] In some other embodiments, in response to a click operation on the import option, a media data selection interface is displayed. At least one of the candidate photos, candidate pictures, and candidate videos is displayed in the media data selection interface. In response to an import operation on the candidate photos, candidate pictures, or candidate videos, a target photo, target picture, or target video is obtained. The target photo, target picture, or target video is displayed in the target interaction interface.
[0049] S120: In response to a triggering operation of the target stylized material, stylize the media data based on the target stylized material to obtain stylized data corresponding to the media data, and display the stylized data in the target interactive interface.
[0050] Wherein, at least part of the image regions in the stylized data are stylized regions. For example, the image regions of the stylized data include stylized regions and real image regions, or all the image regions of the stylized data are stylized regions.
[0051] For example, the stylized data includes stylized pictures, stylized photos, or stylized videos, etc. Among them, the stylized video represents a sequence of stylized video frames.
[0052] Optionally, the stylized data includes first stylized data and second stylized data, wherein the first stylized data represents the overall stylized result of the media data, and the second stylized data represents the local stylized result of the media data. The image regions of the first stylized data are all stylized regions. The image regions of the second stylized data include stylized regions and real image regions.
[0053] Exemplarily, in response to a triggering operation of a target stylized material, the media data is subjected to overall stylization processing based on the target stylized material to obtain the first stylized data. A target stylized region in the media data is obtained, wherein the target stylized region includes at least a portion of an image region in the media data. The media data and the target object in the first stylized data are edited according to the target stylized region to obtain local media data and stylized local data, wherein the local media data and the stylized local data represent a background and a target object, respectively. The second stylized data is generated according to the local media data and the stylized local data. The second stylized data is displayed in a target interactive interface.
[0054] For example, if the local media data represents the background, the stylized local data represents the target object. If the local media data represents the target object, the stylized local data represents the background.
[0055] S130: displaying an editing control set in the target interaction interface, adjusting the image content of the stylized data in response to an interactive operation of the editing control set, and displaying the adjustment result of the stylized data in the target interaction interface.
[0056] The editing control set is a set of preset controls. For example, the editing control set includes a first control, a second control, and a third control. The first control is used to trigger a smear operation detection event. The second control is used to trigger a candidate editing item display event. The third control is used to trigger a region conversion event of the image region to be edited.
[0057] Exemplarily, the adjusting the image content of the stylized data in response to the interactive operation of the editing control set includes: in response to the triggering operation of the first control in the editing control set, obtaining a smearing operation in the target interactive interface. Adjusting the image content of the to-be-edited image area in the stylized data corresponding to the smearing operation to obtain an adjustment result of the stylized data, wherein the to-be-edited image area includes a smeared area or an unsmeared area corresponding to the smearing operation.
[0058] Figure 2 A schematic diagram of a target interaction interface provided by an embodiment of the present disclosure. Figure 2 As shown, the second stylized data 210 of the media data and the editing control set 220 are displayed in the target interaction interface 200. In response to the triggering operation of the first control 230 in the editing control set 220, the smearing operation in the target interaction interface 200 is obtained. The smearing area 240 associated with the second stylized data 210 is determined according to the smearing track corresponding to the smearing operation. The image content corresponding to the smearing area 240 is adjusted to obtain the adjustment result of the second stylized data 210. The adjustment result 250 of the second stylized data 210 is displayed in the target interaction interface 200. Figure 2 The background area of the second stylized data 210 is the real image content, while the background area of the adjustment result 250 includes the real image content and the stylized image content, and the smeared area in the background area presents a stylized effect.
[0059] In the disclosed embodiment, after the smear operation detection event is triggered, the interactive operation in the target interactive interface is detected. If the interactive operation is a smear operation, the image area corresponding to the smear operation in the stylized data is determined to be the smear area. The remaining image area outside the smear area in the stylized data is used as the unsmeared area.
[0060] In some embodiments, in response to a triggering operation of the first control, a smearing operation in the target interactive interface is obtained, a smearing area is determined according to the smearing operation, and image content of the stylized data in the smearing area is adjusted to obtain an adjustment result of the stylized data.
[0061] In some other embodiments, in response to a triggering operation of the first control, a smearing operation in the target interactive interface is obtained. A smearing area is determined according to the smearing operation. An unsmeared area is determined according to an image area of the stylized data and the smeared area. An image content of the unsmeared area in the stylized data is adjusted to obtain an adjustment result of the stylized data.
[0062] Optionally, the adjusting the image content of the stylized data in response to the interactive operation of the editing control set includes: in response to the triggering operation of the second control in the editing control set, displaying a candidate editing item set in the target interactive interface, wherein the candidate editing items in the candidate editing item set are used to represent the first image area in the stylized data. In response to the triggering operation of the candidate editing item set, determining a target editing item, adjusting the image content of the to-be-edited image area in the stylized data corresponding to the target editing item, and obtaining an adjustment result of the stylized data, wherein the to-be-edited image area includes the first image area or the second image area, and the first image area and the second image area constitute the image area of the stylized data.
[0063] Figure 3 FIG. 1 is a schematic diagram of another target interaction interface provided by an embodiment of the present disclosure. Figure 3 As shown, the second stylized data 310 of the media data and the edit control set 320 are displayed in the target interaction interface 300. In response to the triggering operation of the second control 330 in the edit control set 320, the candidate edit item set 340 is displayed in the target interaction interface 300. In response to the selection operation for the candidate edit item in the candidate edit item set 340, the target edit item 350 is determined. The image content in the first image area corresponding to the target edit item 350 in the second stylized data 310 is adjusted to obtain the adjustment result of the second stylized data 310. The adjustment result 360 of the second stylized data 310 is displayed in the target interaction interface 300. Figure 3 In the second stylized data 310 , the sky area presents a stylized effect, while in the adjustment result 360 , the sky area presents a real sky effect.
[0064] In the disclosed embodiment, the first image area represents a preset area in the stylized data. Optionally, the first image area includes at least one image area in the target object and / or at least one image area in the background. For example, the first image area includes at least one area of the target object body, target object clothes, target object skin, sky, mountain peaks, etc. The remaining image area outside the first image area in the image area of the stylized data is used as the second image area.
[0065] In some embodiments, in response to a trigger operation of the second control, a candidate editing item set is displayed in the target interactive interface. The candidate editing item set includes at least one candidate editing item. The candidate editing item is used to represent the first image area in the stylized data. In response to a selection operation on the candidate editing item, the selected candidate editing item is used as the target editing item. The image content in the first image area represented by the target editing item in the stylized data is adjusted to obtain an adjustment result of the stylized data.
[0066] In some other embodiments, after determining the target editing item, a second image region is determined according to the stylized data and the first image region represented by the target editing item, and the image content in the second image region in the stylized data is adjusted to obtain an adjustment result of the stylized data.
[0067] Optionally, adjusting the image content of the image area to be edited includes: converting the stylized image content in the image area to be edited in the stylized data into original image content. And / or, converting the original image content in the image area to be edited in the stylized data into stylized image content. The original image content represents the image content corresponding to the media data to be stylized and the image area to be edited.
[0068] Optionally, in response to a trigger operation of a third control in the editing control set, the image area to be edited is subjected to area conversion processing. If the smeared area is currently used as the image area to be edited, in response to a trigger operation of the third control, the image area to be edited is converted to an unsmeared area. If the first image area is currently used as the image area to be edited, in response to a trigger operation of the third control, the image area to be edited is converted to a second image area.
[0069] In an embodiment of the present disclosure, in response to a trigger operation of a first control in an editing control set, a smearing operation in a target interactive interface is obtained. A smearing area associated with the second stylized data is determined according to a smearing track corresponding to the smearing operation. If the image content in the smearing area includes stylized image content, the stylized image content in the smearing area is converted into the original image content to obtain an adjustment result of the second stylized data. If the image content in the smearing area includes the original image content, the original image content in the smearing area is converted into the stylized image content. The adjustment result of the second stylized data is displayed in the target interactive interface.
[0070] Optionally, in response to a trigger operation of a second control in the editing control set, a candidate editing item set is displayed in a target interactive interface. The candidate editing items in the candidate editing item set are used to characterize a first image area in the second stylized data. In response to a trigger operation of the candidate editing item set, a target editing item is determined. The first image area associated with the second stylized data is determined based on the target editing item. If the image content in the first image area includes stylized image content, the stylized image content in the first image area is converted to original image content. If the image content in the first image area includes original image content, the original image content in the first image area is converted to stylized image content. The adjustment result of the second stylized data is displayed in the target interactive interface.
[0071] Optionally, after displaying the adjustment result of the stylized data in the target interactive interface, the method further includes: in response to a trigger operation of a third control in the editing control set, performing a region conversion process on the image region to be edited. Adjusting the image content corresponding to the converted image region to be edited in the stylized data to update the adjustment result in the target interactive interface.
[0072] For example, if the current image area to be edited is a smeared area, in response to the triggering operation of the third control in the editing control set, the image area to be edited is converted into an unsmeared area. Then, the image content corresponding to the unsmeared area in the second stylized data is adjusted to update the adjustment result. The updated adjustment result is displayed in the target interactive interface. In the updated adjustment result, the image content of the smeared area is converted from the stylized image content to the original image content, and / or, from the original image content to the stylized image content, and the image content of the unsmeared area is converted from the stylized image content to the original image content, and / or, from the original image content to the stylized image content, so as to present the inverse selection effect of the image content of the smeared area and the unsmeared area in the target interactive interface.
[0073] Alternatively, if the current image area to be edited is the first image area, in response to the triggering operation of the third control in the editing control set, the image area to be edited is converted into the second image area. Then, the image content corresponding to the second image area in the second stylized number is adjusted to update the adjustment result. The updated adjustment result is displayed on the target interaction interface to present the inverse selection effect of the image content of the first image area and the second image area in the target interaction interface.
[0074] The technical solution of the disclosed embodiment performs stylized processing on media data through target stylized materials to obtain stylized data, adjusts the image content of the stylized data in response to editing operations on the stylized data, and displays the adjusted results of the stylized data in a target interactive interface, so as to obtain local stylized data with richer picture effects, optimize the local stylization method, and improve the picture effects and interactive experience.
[0075] Figure 4 A flowchart of another media data processing method provided by an embodiment of the present disclosure. Based on the above embodiments, the embodiment of the present disclosure specifically defines stylizing the media data based on target stylized materials to obtain stylized data corresponding to the media data.
[0076] like Figure 4 As shown, the method includes:
[0077] S410: Display the media data to be stylized and the candidate stylized material set in the target interactive interface.
[0078] S420: Determine a target stylized material in response to an interactive operation on the candidate stylized material set.
[0079] S430: Perform overall stylization processing on the media data based on the target stylized material to obtain the first stylized data.
[0080] In the disclosed embodiment, the target stylized material and the media data to be stylized are input into a generative model, and the generative model is used to perform stylized processing on the media data to be stylized with the target stylized material as a condition to obtain first stylized data. The generative model can be a deep learning model trained with image samples having a specific picture style. For example, the picture style includes oil painting style, comic style, or clay style. The picture, photo, or video frame is input into a pre-trained generative model, and the original picture, photo, or video frame is stylized with the target stylized material as a condition through the generative model to obtain a stylized picture, a stylized photo, or a stylized video frame.
[0081] S440: Acquire a target stylized region in the media data, wherein the target stylized region includes at least a portion of an image region in the media data.
[0082] Among them, the target stylized area represents the area in the media data that needs to be locally stylized. For example, the target stylized area can be the foreground, the background, or the area selected by the interactive operation, etc. In the embodiment of the present disclosure, the background local stylization control is displayed in the target interactive interface. In response to the click operation of the background local stylization control, the target stylized area is determined to be the background. The object local stylization control is displayed in the target interactive interface. In response to the click operation of the object local stylization control, the target stylized area is determined to be the target object. Alternatively, in response to the smearing operation in the target interactive interface, the target stylized area is determined according to the smearing area. Alternatively, in response to the circle selection operation in the target interactive interface, the target stylized area is determined according to the circled area, etc. Among them, the target object includes a person, an animal, or a commodity, etc. The person includes a real person or a virtual person, etc., and the virtual person includes a generated person, a comic character, or a cartoon character, etc.
[0083] A stylized control set is displayed in a target interactive interface, and in response to a click operation of the stylized control set, a target stylized control is determined, and a target stylized area is determined according to the target stylized control. The stylized control set includes a background local stylized control and an object local stylized control, etc. Specifically, in response to a click operation of the background local stylized control, the target stylized control is determined to be a background local stylized control, and the background area in the media data is used as the target stylized area. Alternatively, in response to a click operation of the object local stylized control, the target stylized control is determined to be an object local stylized control, and the area corresponding to the target object in the media data is used as the target stylized area.
[0084] S450: Edit the media data and the target object in the first stylized data according to the target stylized region to obtain local media data and stylized local data, wherein the local media data and the stylized local data represent a background and a target object, respectively.
[0085] Wherein, editing the target object includes eliminating the target object or segmenting the target object. In the embodiment of the present disclosure, the target object in the media data and the first stylized data is edited according to the target stylized region to obtain local media data and stylized local data, including: if the target stylized region represents the background, performing a target object elimination operation on the first stylized data to obtain stylized local data. Performing a target object segmentation operation on the media data to obtain local media data.
[0086] In some other embodiments, if the target stylized region represents a target object, a target object elimination operation is performed on the media data to obtain local media data. A target object segmentation operation is performed on the first stylized data to obtain stylized local data.
[0087] Exemplarily, editing the target object in the media data and the first stylized data according to the target stylized region to obtain local media data and stylized local data includes: determining a first mask map according to the target object in the media data, and determining a second mask map according to the target object in the first stylized data. Editing the target object according to the target stylized region, the first mask map, and the second mask map to obtain the local media data and stylized local data
[0088] Among them, the first mask map represents the target object in the media data. The second mask map represents the target object in the first stylized data. The first mask map and the second mask map can be determined by an image segmentation algorithm. For example, the target object in the media data is identified by an image segmentation algorithm, and the target object is segmented to obtain the first mask map. The target object in the first stylized data is identified by an image segmentation algorithm, and the target object is segmented to generate the second mask map. By respectively identifying the target objects in the media data and the first stylized data, a first mask map corresponding to the outline of the target object in the media data is generated, and a second mask map corresponding to the outline of the target object in the first stylized data is generated. By editing the target object in the media data and the target object in the first stylized data based on the first mask map and the second mask respectively, the display problem around the outline of the target object of the local stylization result can be solved.
[0089] Figure 5 is a local stylized image with overlapping portrait contours, such as Figure 5 As shown, in addition to the outline 510 of the real portrait, there are also partial outlines (520, 530, 540 and 550) of the stylized portrait, resulting in the problem that the real portrait cannot completely cover the stylized portrait in the local stylization result. The disclosed embodiment generates a first mask map and a second mask map according to the recognition results by respectively identifying the target objects in the media data and the first stylized data. Thus, the stylized person in the stylized image is eliminated according to the second mask map to obtain a stylized background image, the real person is segmented from the original image according to the first mask map, and then the real person is superimposed on the stylized background image to obtain a background stylized image 560. Since there is no stylized portrait in the background, the problem of overlapping outlines of the target object in the local stylization result is solved.
[0090] Alternatively, since the target object outline is smaller than the stylized target object outline, if the mask map corresponding to the target object is used to segment the target object in the stylized image, the target object may be incomplete, thereby affecting the picture effect of the object stylized image. The disclosed embodiment generates a first mask map and a second mask map according to the recognition results by respectively identifying the target objects in the media data and the first stylized data. The target object in the original image is eliminated according to the first mask to obtain the original background image. The target object is segmented from the stylized image according to the second mask map, and then the target object is superimposed on the original background image to obtain the object stylized image. Since the second mask map is determined based on the recognition result of the target object, the target object can be completely segmented, solving the problem of incomplete target object in the object stylized image.
[0091] Optionally, the target object is edited according to the target stylized region, the first mask map, and the second mask map to obtain the local media data and the stylized local data, including: if the target stylized region represents the background, the target object in the first stylized data is deleted according to the second mask map. The deleted region corresponding to the target object in the first stylized data is padded with pixels to obtain the stylized local data. The target object in the media data is segmented according to the first mask map to obtain the local media data.
[0092] Specifically, if local background stylization is selected, the target stylized area represents the background, and the second mask map and the stylized image are input into the pre-trained generative adversarial network. The target object in the stylized image is removed based on the second mask map through the generative adversarial network, and the deleted area after the target object is deleted is filled with pixels around the target object to obtain a stylized background image. The target object in the original image is segmented according to the first mask map to obtain a target object map. For example, for the first mask map, the pixel value of the pixel area corresponding to the target object is 1, and the pixel value of the non-target object area is 0. The first mask map is multiplied by the original image to realize the cutout of the target object, and a target object map containing only the target object is obtained. Among them, the target object area in the target object map is an opaque area, and the non-target object area is a transparent area.
[0093] Optionally, the target object is edited according to the target stylized region, the first mask map, and the second mask map to obtain the local media data and the stylized local data, including: if the target stylized region represents the target object, the target object in the media data is deleted according to the first mask map. The deleted region corresponding to the target object in the media data is padded with pixels to obtain the local media data. The target object in the first stylized data is segmented according to the second mask map to obtain the stylized local data.
[0094] Specifically, if the target object is selected to be stylized, the target stylized area represents the target object. The first mask image and the original image are input into a pre-trained generative adversarial network, and the target object in the original image is removed by the generative adversarial network based on the first mask image, and the deleted area after the target object is deleted is filled with pixels around the target object to obtain the original background image. The target object in the stylized image is segmented according to the second mask image to obtain a stylized object image. For example, for the second mask image, the pixel value of the pixel area corresponding to the target object is 1, and the pixel value of the non-target object area is 0. The second mask image is multiplied by the stylized image to realize the cutout of the target object in the stylized image, and a stylized object image containing only the target object is obtained. Among them, the target object area in the stylized object image is an opaque area, and the non-target object area is a transparent area.
[0095] S460: Generate the second stylized data according to the local media data and the stylized local data.
[0096] Exemplarily, the local media data and the stylized local data are fused to obtain the second stylized data of the media data. In some embodiments, the stylized background image and the target object map are fused to obtain the background stylized image of the original image. The background stylized image presents a picture effect in which the stylized background and the real target object blend with each other. Specifically, the target object map is superimposed on the stylized background image to present the stylized background area in the transparent area of the target object map, and present the real target object in the opaque area.
[0097] In some other embodiments, the original background image and the stylized object map are fused to obtain an object stylized image of the original image. The object stylized image presents a picture effect in which the stylized target object and the real background blend with each other. Specifically, the object stylized image is superimposed on the original background image so that the real background area is presented in the transparent area of the stylized object map, and the stylized target object is presented in the opaque area.
[0098] Exemplarily, generating the second stylized data of the media data according to the local media data and the stylized local data includes: determining the semi-transparent area in the target object according to the mask of the first mask map or the second mask map. Determining the target pixel value corresponding to the semi-transparent area of the second stylized data according to the pixel values corresponding to the semi-transparent area of the local media data and the stylized local data respectively. Generating the second stylized data according to the target pixel value, the local media data and the stylized local data.
[0099] The semi-transparent area represents the area where the mask in the first mask map or the second mask map is between (0, 1). For example, if the target stylized area represents the background, the semi-transparent area is determined according to the position where the mask corresponding to the target object map is greater than 0 and less than 1. If the target stylized area represents the target object, the semi-transparent area is determined according to the position where the mask corresponding to the stylized object map is greater than 0 and less than 1.
[0100] Since in the mask map, the mask corresponding to the background area is 0, and the mask corresponding to the main object area is 1, for the area that is not the background and the main object, the mask is greater than zero and less than 1. Therefore, the semi-transparent area in the first mask map or the second mask map can be determined according to the mask of the first mask map or the second mask map. For example, the semi-transparent area includes the edge area, shadow, reflection or hollow area of the target object. In the embodiment of the present disclosure, the semi-transparent area may include the outer contour area or hollow area of the target object.
[0101] According to the pixel coordinates of the semi-transparent area, the pixel value corresponding to the local media data of the semi-transparent area is determined, and the pixel value corresponding to the stylized local data of the semi-transparent area is determined. According to the pixel values corresponding to the local media data and the stylized local data of the semi-transparent area, and the transparency corresponding to the pixel values, the target pixel value is determined.
[0102] The local media data and the stylized local data are superimposed to obtain superimposed data, and pixels corresponding to the semi-transparent area in the superimposed data are updated based on the target pixel value to obtain the second stylized data.
[0103] Optionally, according to the mask of the first mask map or the second mask map, the semi-transparent area, transparent area and opaque area in the target object are determined. For the semi-transparent area, the target pixel value corresponding to the local stylized result and the semi-transparent area is determined according to the pixel values corresponding to the local media data and the stylized local data of the semi-transparent area respectively. For the transparent area and the opaque area, the local media data and the stylized local data are superimposed to obtain the superimposed data. The second stylized data is determined according to the target pixel value and the superimposed data. In the process of superimposing the local media data and the stylized local data, the pixel values corresponding to the semi-transparent area are superimposed on the local media data and the stylized local data according to the transparency information, so as to ensure that the edge area and the hollow area of the target object in the local stylized result are consistent with the background.
[0104] Figure 6 This is a comparison chart of the effects of the background stylized image provided in the embodiment of the present disclosure. Figure 6The image on the left in the middle is a background stylized image obtained by directly superimposing the target object image and the stylized background image. It can be seen that the top edge 610 of the target object's head is inconsistent with the stylized background, resulting in a poor fusion effect between the target object and the stylized background. Figure 6 The middle right image is a background stylized image obtained by superimposing the local media data and the stylized local data with the pixel values corresponding to the semi-transparent area according to the transparency information. It can be seen that the top edge 620 of the target object's head is consistent with the stylized background, and the hair presents a hollow feeling relative to the light.
[0105] In some embodiments, if the target stylized area represents the background, the semi-transparent area, transparent area and opaque area in the first mask image are determined according to the first mask image. For the semi-transparent area, the first multiplication result of the pixel value corresponding to the semi-transparent area and the target object image and the first transparency corresponding to the pixel value is calculated, and the second multiplication result of the pixel value corresponding to the semi-transparent area and the background stylized image and the second transparency corresponding to the pixel value is calculated. The target pixel value corresponding to the background stylized image and the semi-transparent area is determined according to the first multiplication result and the second multiplication result. The first transparency is determined according to the mask of the first mask image. The second transparency is determined according to the first transparency. For example, the first transparency is x and the second transparency is 1-x. For the transparent area and the opaque area, the target object image is superimposed on the background stylized image to obtain a first superimposed image. The background stylized image of the original image is determined according to the target pixel value and the first superimposed image.
[0106] In some other embodiments, if the target stylized area represents the target object, the semi-transparent area, transparent area and opaque area in the second mask image are determined according to the second mask image. For the semi-transparent area, the third multiplication result of the pixel value corresponding to the semi-transparent area and the stylized object image and the third transparency corresponding to the pixel value is calculated, and the fourth multiplication result of the pixel value corresponding to the semi-transparent area and the original background image and the fourth transparency corresponding to the pixel value is calculated. The target pixel value corresponding to the object stylized image and the semi-transparent area is determined according to the third multiplication result and the fourth multiplication result. The third transparency is determined according to the mask of the second mask image. The fourth transparency is determined according to the third transparency. For the transparent area and the opaque area, the stylized object image is superimposed on the original background image to obtain a second superimposed image. The object stylized image of the original image is determined according to the target pixel value and the second superimposed image.
[0107] Figure 7 A schematic diagram of a process flow of background stylization in a media data processing method provided by an embodiment of the present disclosure, such as Figure 7As shown, the method includes: obtaining an original image 710, wherein the original image 710 includes a target object. For example, a photo is taken by a camera of a mobile terminal as the original image 710. Alternatively, a photo or picture is uploaded through a local album as the original image 710. The original image 710 is displayed in a target interaction interface 700. In response to a click operation of a background local stylization control 720 in the target interaction interface 700, the target stylized area is determined to be the background. On the one hand, the original image 710 is subjected to overall stylization processing based on the target stylized material to obtain a stylized image 730. According to the target object in the stylized image 730, a second mask map is determined. The second mask map and the stylized image 730 are input into a generative adversarial network, and the target object in the stylized image 730 is eliminated by the generative adversarial network to obtain a stylized background image 740. On the other hand, the target object in the original image 710 is identified, and the first mask map is determined according to the target object in the original image 710. By multiplying the original image 710 by the first mask image, the target object in the original image 710 is cut out, and a target object image 750 containing only the target object is obtained. The semi-transparent area in the target object and the transparency of the pixels of the target object in the semi-transparent area are determined according to the mask of the first mask image. Since the target object area in the target object image 750 is an opaque area and the non-target object area is a transparent area, the target object image 750 is superimposed on the stylized background image 740, and based on the pixel values corresponding to the semi-transparent area of the target object image 750 and the stylized background image 740 and the transparency of the pixel values, the target pixel values corresponding to the semi-transparent area of the background stylized image are determined to obtain the background stylized image 760. For example, for the hair edge of the target object, the sum of the pixel value of the hair edge area multiplied by the corresponding transparency and the pixel value of the cloud multiplied by the corresponding transparency is used as the final color of the hair edge area.
[0108] It should be noted that the stylization processing and object elimination processing steps of the original image and the object segmentation step of the original image can be performed in parallel.
[0109] Figure 8 A schematic diagram of the process of object stylization in a media data processing method provided by an embodiment of the present disclosure, such as Figure 8As shown, the method includes: in response to the data import operation in the target interaction interface 800, obtaining the original image 810. Displaying the original image 810 in the target interaction interface 800. In response to the click operation of the object local stylization control 820 in the target interaction interface 800, determining the target stylized area as the target object. On the one hand, stylizing the original image 810 based on the target stylized material to obtain a stylized image 830. According to the target object in the stylized image, determining the second mask map. By multiplying the second mask map by the stylized image 830, the target object in the stylized image 830 is cut out to obtain a stylized object map 840 with only the target object. On the other hand, identifying the target object in the original image 810, and determining the first mask map according to the target object in the original image 810. The first mask map and the original image 810 are input into a generative adversarial network, and the target object in the original image 810 is eliminated by the generative adversarial network to obtain an original background image 850. Since the target object area in the stylized object image 840 is an opaque area and the non-target object area is a transparent area, the stylized object image 840 is superimposed on the original background image 850, and based on the pixel values corresponding to the semi-transparent areas of the stylized object image 840 and the original background image 850 and the transparency of the pixel values, the target pixel values corresponding to the semi-transparent areas of the object stylized image are determined to obtain the object stylized image 860.
[0110] S470: Display the second stylized data in the target interactive interface.
[0111] S480: Displaying an editing control set in the target interaction interface, adjusting the image content of the stylized data in response to an interactive operation of the editing control set, and displaying the adjustment result of the stylized data in the target interaction interface.
[0112] The technical solution of the disclosed embodiment performs overall stylization processing on the media data based on the target stylized material to obtain the first stylized data. Obtain a target stylized area in the media data. Then, edit the media data and the target object in the first stylized data respectively according to the target stylized area to obtain local media data and stylized local data, and generate second stylized data of the media data according to the local media data and the stylized local data. Since the first stylized data is obtained by stylizing the media data, and the target object in the first stylized data is edited according to the target stylized area, a stylized background or a stylized target object is obtained. The stylized background or the stylized target object is combined with the target object or background in the media data to generate background local stylized data or target object local stylized data, which ensures the coordination between the target object and the background environment, can solve the overlapping problem at the outline of the target object, and improve the picture effect of the local stylized result. In addition, only the media data to be stylized, the target stylized material and the target stylized area need to be specified to obtain the local stylized result, which simplifies the operation method of local stylization.
[0113] Fig. 9 This is a structural diagram of a media data processing device provided in an embodiment of the present disclosure. The device can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server.
[0114] like Fig. 9 As shown, the device includes: a display module 910, a stylization module 920 and an editing module 930.
[0115] A display module 910, configured to display the media data to be stylized and a candidate stylized material set in a target interactive interface, wherein the candidate stylized material set includes a target stylized material;
[0116] a stylization module 920, configured to, in response to a triggering operation of the target stylized material, perform stylization processing on the media data based on the target stylized material, obtain stylized data corresponding to the media data, and display the stylized data in the target interactive interface, wherein at least a portion of the image area in the stylized data is a stylized area;
[0117] The editing module 930 is used to display the editing control set in the target interactive interface, adjust the image content of the stylized data in response to the interactive operation of the editing control set, and display the adjustment result of the stylized data in the target interactive interface.
[0118] Optionally, the editing module 930 is specifically used for:
[0119] In response to a triggering operation of a first control in the editing control set, obtaining a smearing operation in the target interactive interface;
[0120] The image content of the to-be-edited image region corresponding to the smearing operation in the stylized data is adjusted to obtain an adjustment result of the stylized data, wherein the to-be-edited image region includes a smeared region or an unsmeared region corresponding to the smearing operation.
[0121] Optionally, the editing module 930 is specifically used for:
[0122] In response to a triggering operation of a second control in the editing control set, displaying a candidate editing item set in the target interactive interface, wherein the candidate editing items in the candidate editing item set are used to represent a first image region in the stylized data;
[0123] In response to a triggering operation of the candidate editing item set, a target editing item is determined, and the image content of the image area to be edited corresponding to the target editing item in the stylized data is adjusted to obtain an adjustment result of the stylized data, wherein the image area to be edited includes the first image area or the second image area, and the first image area and the second image area constitute the image area of the stylized data.
[0124] Further, adjusting the image content of the image area to be edited includes:
[0125] Converting the stylized image content in the to-be-edited image region in the stylized data into original image content;
[0126] and / or,
[0127] The original image content in the to-be-edited image area in the stylized data is converted into stylized image content.
[0128] Optionally, it also includes:
[0129] a content updating module, configured to perform a region conversion process on the image region to be edited in response to a triggering operation of a third control in the editing control set after displaying the adjustment result of the stylized data in the target interactive interface;
[0130] The image content corresponding to the converted image area to be edited in the stylized data is adjusted to update the adjustment result in the target interactive interface.
[0131] Optionally, the stylized data includes first stylized data and second stylized data, wherein the first stylized data represents an overall stylized result of the media data, and the second stylized data represents a local stylized result of the media data.
[0132] The stylization module 920 is specifically used for:
[0133] Performing overall stylization processing on the media data based on the target stylized material to obtain the first stylized data;
[0134] Acquire a target stylized region in the media data, wherein the target stylized region includes at least a portion of an image region in the media data;
[0135] Editing the media data and the target object in the first stylized data according to the target stylized region to obtain local media data and stylized local data, wherein the local media data and the stylized local data represent a background and a target object respectively;
[0136] The second stylized data is generated according to the local media data and the stylized local data.
[0137] Optionally, the editing the media data and the target object in the first stylized data according to the target stylized area to obtain local media data and stylized local data includes:
[0138] Determine a first mask map according to the target object in the media data, and determine a second mask map according to the target object in the first stylized data;
[0139] The target object is edited according to the target stylized region, the first mask image, and the second mask image to obtain the local media data and the stylized local data.
[0140] Optionally, the editing the target object according to the target stylized region, the first mask map, and the second mask map to obtain the local media data and the stylized local data includes:
[0141] If the target stylized area represents the background, deleting the target object in the first stylized data according to the second mask image;
[0142] Filling pixels in a deleted area corresponding to the target object in the first stylized data to obtain the stylized local data;
[0143] The target object in the media data is segmented according to the first mask image to obtain the local media data.
[0144] Optionally, the editing the target object according to the target stylized area, the first mask map, and the second mask map to obtain the local media data and the stylized local data includes:
[0145] If the target stylized region represents a target object, deleting the target object in the media data according to the first mask image;
[0146] Filling pixels in a deleted area in the media data corresponding to the target object to obtain the local media data;
[0147] The target object in the first stylized data is segmented according to the second mask image to obtain the stylized local data.
[0148] Optionally, the generating the second stylized data according to the local media data and the stylized local data includes:
[0149] Determining a semi-transparent area in the target object according to the mask of the first mask map or the second mask map;
[0150] Determining a target pixel value corresponding to the semi-transparent area by the second stylized data according to the pixel values corresponding to the semi-transparent area by the local media data and the stylized local data respectively;
[0151] The second stylized data is generated according to the target pixel value, the local media data and the stylized local data.
[0152] Optionally, generating the second stylized data according to the target pixel value, the local media data and the stylized local data includes:
[0153] The local media data and the stylized local data are superimposed to obtain superimposed data, and pixels corresponding to the semi-transparent area in the superimposed data are updated based on the target pixel value to obtain the second stylized data.
[0154] The media data processing device provided in the embodiments of the present disclosure can execute the media data processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0155] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0156] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Fig.10 , which shows an electronic device (eg, Fig.10The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0157] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 are also stored. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An edit / output (I / O) interface 1005 is also connected to the bus 1004.
[0158] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0159] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0160] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0161] The electronic device provided by the embodiment of the present disclosure and the media data 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.
[0162] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the media data processing method provided by the above embodiments is implemented.
[0163] It should be noted that the computer-readable medium disclosed above 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. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0164] In some embodiments, the client and the 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). 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.
[0165] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0166] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0167] Displaying the media data to be stylized and the candidate stylized material set in the target interactive interface, wherein the candidate stylized material set includes the target stylized material;
[0168] In response to a triggering operation of the target stylized material, stylizing the media data based on the target stylized material to obtain stylized data corresponding to the media data, and displaying the stylized data in the target interactive interface, wherein at least a portion of the image area in the stylized data is a stylized area;
[0169] An editing control set is displayed in the target interaction interface, image content of the stylized data is adjusted in response to an interactive operation of the editing control set, and the adjustment result of the stylized data is displayed in the target interaction interface.
[0170] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0171] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, 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. It should also be noted that in some implementations as replacements, 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. It should also be noted that 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.
[0172] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0173] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0174] In the context of the present disclosure, 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, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0175] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0176] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0177] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A media data processing method, characterized in that: include: Displaying the media data to be stylized and the candidate stylized material set in the target interactive interface, wherein the candidate stylized material set includes the target stylized material; In response to a triggering operation of the target stylized material, stylizing the media data based on the target stylized material to obtain stylized data corresponding to the media data, and displaying the stylized data in the target interactive interface, wherein at least a portion of the image area in the stylized data is a stylized area; An editing control set is displayed in the target interaction interface, image content of the stylized data is adjusted in response to an interactive operation of the editing control set, and the adjustment result of the stylized data is displayed in the target interaction interface.
2. The method according to claim 1, characterized in that The adjusting the image content of the stylized data in response to the interactive operation of the editing control set includes: In response to a triggering operation of a first control in the editing control set, obtaining a smearing operation in the target interactive interface; The image content of the to-be-edited image region corresponding to the smearing operation in the stylized data is adjusted to obtain an adjustment result of the stylized data, wherein the to-be-edited image region includes a smeared region or an unsmeared region corresponding to the smearing operation.
3. The method according to claim 1, characterized in that The adjusting the image content of the stylized data in response to the interactive operation of the editing control set includes: In response to a triggering operation of a second control in the editing control set, displaying a candidate editing item set in the target interactive interface, wherein the candidate editing items in the candidate editing item set are used to represent a first image region in the stylized data; In response to a triggering operation of the candidate editing item set, a target editing item is determined, and the image content of the image area to be edited corresponding to the target editing item in the stylized data is adjusted to obtain an adjustment result of the stylized data, wherein the image area to be edited includes the first image area or the second image area, and the first image area and the second image area constitute the image area of the stylized data.
4. The method according to claim 2 or 3, characterized in that: Adjusting the image content of the image area to be edited includes: Converting the stylized image content in the to-be-edited image region in the stylized data into original image content; and / or, The original image content in the to-be-edited image area in the stylized data is converted into stylized image content.
5. The method according to claim 4, characterized in that After displaying the adjustment result of the stylized data in the target interaction interface, the method further includes: In response to a triggering operation of a third control in the editing control set, performing a region conversion process on the image region to be edited; The image content corresponding to the converted image area to be edited in the stylized data is adjusted to update the adjustment result in the target interactive interface.
6. The method according to claim 1, characterized in that The stylized data includes first stylized data and second stylized data, wherein the first stylized data represents an overall stylized result of the media data, and the second stylized data represents a local stylized result of the media data; The performing stylized processing on the media data based on the target stylized material to obtain stylized data corresponding to the media data includes: Performing overall stylization processing on the media data based on the target stylized material to obtain the first stylized data; Acquire a target stylized region in the media data, wherein the target stylized region includes at least a portion of an image region in the media data; Editing the media data and the target object in the first stylized data according to the target stylized region to obtain local media data and stylized local data, wherein the local media data and the stylized local data represent a background and a target object respectively; The second stylized data is generated according to the local media data and the stylized local data.
7. The method according to claim 6, characterized in that The step of editing the target object in the media data and the first stylized data according to the target stylized area to obtain local media data and stylized local data includes: Determine a first mask map according to the target object in the media data, and determine a second mask map according to the target object in the first stylized data; The target object is edited according to the target stylized region, the first mask image, and the second mask image to obtain the local media data and the stylized local data.
8. The method according to claim 7, characterized in that The step of editing the target object according to the target stylized region, the first mask map, and the second mask map to obtain the local media data and the stylized local data includes: If the target stylized area represents the background, deleting the target object in the first stylized data according to the second mask image; Filling pixels in a deleted area corresponding to the target object in the first stylized data to obtain the stylized local data; The target object in the media data is segmented according to the first mask image to obtain the local media data.
9. The method according to claim 7, characterized in that: The step of editing the target object according to the target stylized region, the first mask map, and the second mask map to obtain the local media data and the stylized local data includes: If the target stylized region represents a target object, deleting the target object in the media data according to the first mask image; Filling pixels in a deleted area in the media data corresponding to the target object to obtain the local media data; The target object in the first stylized data is segmented according to the second mask image to obtain the stylized local data.
10. The method according to claim 7, characterized in that The generating the second stylized data according to the local media data and the stylized local data includes: Determining a semi-transparent area in the target object according to the mask of the first mask map or the second mask map; Determining a target pixel value corresponding to the semi-transparent area by the second stylized data according to the pixel values corresponding to the semi-transparent area by the local media data and the stylized local data respectively; The second stylized data is generated according to the target pixel value, the local media data and the stylized local data.
11. The method according to claim 10, characterized in that The generating the second stylized data according to the target pixel value, the local media data and the stylized local data includes: The local media data and the stylized local data are superimposed to obtain superimposed data, and pixels corresponding to the semi-transparent area in the superimposed data are updated based on the target pixel value to obtain the second stylized data.
12. A media data processing device, characterized in that: include: A display module, used to display the media data to be stylized and the candidate stylized material set in the target interactive interface, wherein the candidate stylized material set includes the target stylized material; a stylization module, configured to respond to a triggering operation of the target stylized material, perform stylization processing on the media data based on the target stylized material, obtain stylized data corresponding to the media data, and display the stylized data in the target interactive interface, wherein at least a portion of the image area in the stylized data is a stylized area; The editing module is used to display the editing control set in the target interactive interface, adjust the image content of the stylized data in response to the interactive operation of the editing control set, and display the adjustment result of the stylized data in the target interactive interface.
13. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the media data processing method as described in any one of claims 1-11.
14. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the media data processing method as described in any one of claims 1-11.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the media data processing method as described in any one of claims 1 to 11.
Citation Information
Cited By
Media data processing method and apparatus, device, medium, and program product
WO2026166532A1