Media data processing method and device, equipment, medium and program product

By determining the shape of the fuzzy kernel based on the reference object in media data processing, the problem of lack of flexible selection of the fuzzy kernel shape in the prior art is solved, and a richer media data lens blur effect is achieved.

CN120163727APending Publication Date: 2025-06-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510229266.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

The prior art lacks the fuzzy processing scheme that flexibly selects fuzzy core shapes, resulting in the lens blur effect of media data not rich enough.

Method used

By displaying the original media data on the first page, obtaining the reference media data in response to the interactive operation, determining the shape of the fuzzy kernel based on the reference object in the reference media data, and fuzzing the original media data based on the fuzzy kernel to generate the target media data.

Benefits of technology

It realizes the flexibility to select blur kernels of different shapes according to different reference objects, enriches the screen effect of the target media data, and optimizes the lens blur scheme of the media data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120163727A_ABST
    Figure CN120163727A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a media data processing method and device, equipment, a medium and a program product. The method comprises the following steps: displaying original media data on a first page; in response to an interaction operation in the first page, reference media data are obtained, a fuzzy kernel is determined according to a reference object in the reference media data, and the shape of the fuzzy kernel is associated with the reference object; and performing fuzzy processing on the original media data based on the fuzzy kernel to obtain target media data, and displaying the target media data on the first page. According to the embodiment of the invention, the problem that the prior art lacks a blurring scheme for flexibly selecting the shape of the blurring kernel is solved, the lens blurring scheme of the media data is optimized, and the shape of the blurring kernel is flexibly selected. Since the light spots in the target media data generated based on the fuzzy kernel are associated with the shape of the fuzzy kernel, the image effect of the target media data is enriched by flexibly selecting the shape of the fuzzy kernel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to computer technology, and in particular, to a method, apparatus, device, medium, and program product for processing media data. Background Art

[0002] Lens blur is a type of blur processing method used to simulate the out-of-focus imaging effect of a camera, that is, the natural blurring (such as the spot effect) in the area outside the focus due to the characteristics of the optical lens. For example, performing lens blur processing on the original image based on a blur kernel can obtain an image with a spot effect, enriching the image display effect. However, the related art lacks a blur processing solution that can flexibly select the shape of the blur kernel. Summary of the Invention

[0003] The present disclosure provides a method, apparatus, device, medium, and program product for processing media data, which can flexibly select the shape of the blur kernel and enrich the picture effect of the target media data.

[0004] In a first aspect, embodiments of the present disclosure provide a method for processing media data, including:

[0005] Displaying original media data on a first page;

[0006] In response to an interaction operation in the first page, obtaining reference media data, and determining a blur kernel according to a reference object in the reference media data, where the shape of the blur kernel is associated with the reference object;

[0007] Performing blur processing on the original media data based on the blur kernel to obtain target media data, and displaying the target media data on the first page, where the shape of the spot in the target media data is associated with the reference object.

[0008] In a second aspect, embodiments of the present disclosure further provide a device for processing media data, the device includes:

[0009] A display module, configured to display original media data on a first page;

[0010] A weight matrix determination module, configured to obtain reference media data in response to an interaction operation in the first page, and determine a blur kernel according to a reference object in the reference media data, where the shape of the blur kernel is associated with the reference object;

[0011] A blur processing module, configured to perform blur processing on the original media data based on the blur kernel to obtain target media data, and display the target media data on the first page, where the shape of the spot in the target media data is associated with the reference object.

[0012] In a third aspect, embodiments of the present disclosure further provide an electronic device, which includes:

[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 method for processing media data as described in any embodiment of the present disclosure.

[0016] In a fourth aspect, embodiments of the present disclosure further provide a storage medium containing computer-executable instructions, which are used to execute the method for processing media data as described in any embodiment of the present disclosure when executed by a computer processor.

[0017] In a fifth aspect, embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the method for processing media data as described in any embodiment of the present disclosure when executed by a processor.

[0018] Embodiments of the present disclosure provide a solution for processing media data. By displaying the original media data on the first page, in response to an interaction operation on the first page, obtaining reference media data, determining a blur kernel according to a reference object in the reference media data, performing blur processing on the original media data according to the blur kernel to obtain target media data, and displaying the target media data on the first page. Since the shape of the blur kernel is associated with the reference object, different shapes of blur kernels can be determined according to different reference objects. Embodiments of the present disclosure solve the problem in the related art of lacking a blur solution for flexibly selecting the shape of the blur kernel, optimize the lens blur solution for media data, and achieve flexible selection of the shape of the blur kernel. Since the light spots in the target media data generated based on the blur kernel are associated with the shape of the blur kernel, by flexibly selecting the shape of the blur kernel, the visual effect of the target media data is enriched. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Combined with the drawings and referring to the following specific embodiments, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original elements and elements are not necessarily drawn to scale.

[0020] Figure 1 It is a flowchart of a method for processing media data provided by an embodiment of the present disclosure;

[0021] Figure 2 It is a schematic diagram of a page provided by an embodiment of the present disclosure;

[0022] Figure 3 Schematic diagram of a reference media data provided by an embodiment of the present disclosure;

[0023] Figure 4 Schematic diagram of a first pixel point set provided by an embodiment of the present disclosure;

[0024] Figure 5 Schematic diagram of a second pixel point set provided by an embodiment of the present disclosure;

[0025] Figure 6 Combined diagram of a first pixel point set and a second pixel point set provided by an embodiment of the present disclosure;

[0026] Figure 7 Schematic diagram of a target media data provided by an embodiment of the present disclosure;

[0027] Figure 8 Flow schematic diagram of another method for processing media data provided by an embodiment of the present disclosure;

[0028] Figure 9 Structural schematic diagram of a media data processing device provided by an embodiment of the present disclosure;

[0029] Figure 10 Structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners

[0030] Embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0031] It should be understood that the steps recited in the method embodiments of the present disclosure can be executed in a different order 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 regard.

[0032] The term "including" and its variations used herein are open-ended, i.e., "including but not limited to". The term "based on" is "at least partially based 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 this 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 modification of "one" and "multiple" mentioned in this disclosure is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified 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 this disclosure are only for illustrative purposes, and are not used to limit the scope of these messages or information.

[0036] It can be understood that before using the technical solutions disclosed in the embodiments of this disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0037] For example, when responding 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 by the user 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, an application program, a server, or a storage medium that performs the operations of the technical solutions of this disclosure according to the prompt message.

[0038] As an optional but non-limiting implementation manner, the way of sending a prompt message to the user in response to receiving an active request from the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0039] It can be understood that the above process of notifying and obtaining the user's authorization is only illustrative and does not constitute a limitation on the implementation manner of this disclosure. Other ways that meet relevant laws and regulations can also be applied to the implementation manner of this disclosure.

[0040] It can be understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of corresponding laws, regulations and related provisions.

[0041] Figure 1The flowchart shows a method for processing media data provided by an embodiment of the present disclosure. The embodiment is applicable to the situation of generating a lens blur effect for media data. The method can be executed by a media data processing device, which 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, etc.

[0042] As Figure 1 shown, the method includes:

[0043] S110. Display the original media data on the first page.

[0044] Among them, the first page can be an image editing page. For example, the first page can be an editing page in a video editing software. The original media data represents the media data to be subjected to lens blur processing. Among them, the media data includes pictures, videos, etc. The original media data can be a captured picture or video. Optionally, the original media data can also be a picture or video in a local media resource library. Optionally, the original media data can also include downloaded pictures or videos. For example, the original media data can be a picture or video downloaded from a web page, or a picture or video downloaded from a chat record, etc.

[0045] S120. In response to an interaction operation on the first page, obtain reference media data, and determine a blur kernel according to a reference object in the reference media data, where the shape of the blur kernel is associated with the reference object.

[0046] Among them, the interaction operation on the first page can include a reference media data selection operation or an upload operation. The reference media data refers to pictures, videos, etc. that contain a reference object. For example, the reference media data can be a picture or video including a heart-shaped pattern. Or, the reference media data can also be a picture or video including a smiling face emoji, etc. Optionally, the reference media data can also be a picture or video uploaded by the user, etc. The reference object refers to the main body in the reference media data. For example, a graph drawn by the user can be used as the reference object, and the picture containing the drawn graph can be used as the reference media data. The graph drawn by the user can include snowflakes, flowers, polygons, etc. Or, an object in a photo taken by the user can also be used as the reference object, and the taken photo can be used as the reference media data. The taken photo can be a photo of a water cup, a car, etc.

[0047] The blur kernel is the weight matrix used in the blurring process. Based on the blur kernel, the pixel points in the local area of the original media data are weighted and summed to obtain the weighted sum result corresponding to the current local area. The pixel value of the current pixel point in the target media data is determined according to the weighted sum result corresponding to the current local area. Among them, the pixel value includes the brightness values of each color channel, etc. By sliding the blur kernel, the weighted sum results of the pixel points in each local area of the original media data are calculated, and according to the weighted sum results corresponding to each local area, the pixel values of each pixel point in the target media data are determined, and then the target media data is obtained. The elements of the blur kernel are the weights in the weight matrix. The elements of the blur kernel can be determined according to the brightness values of the pixel points in the reference object.

[0048] Exemplarily, the obtaining the reference media data in response to the interaction operation in the first page includes: a first control is further displayed in the first page. In response to the trigger operation of the first control, a second page is displayed, where the second page includes candidate media data, and the candidate media data includes the reference media data. In response to the interaction operation in the second page, the reference media data is obtained.

[0049] Among them, the candidate media data may include pictures or videos in the local media resource library, etc. The candidate media data may include pictures or videos designed and saved by the user in the local media resource library, etc. The candidate media data may also include pictures or videos downloaded and saved by the user in the local media resource library, etc. Among them, the picture or video may be a black-and-white image, or the picture or video may be a color image. The second page is the display page of the media data in the local media resource library. The interaction operation in the second page may include at least one of the following operations: the selection operation for the reference media data in the second page, the sliding operation in the second page, and the reordering operation in the second page.

[0050] Figure 2 A page schematic diagram provided by an embodiment of the present disclosure. As Figure 2 shown, the original media data 220 and the first control 230 are displayed on the first page 210. In response to the trigger operation of the first control 230, the second page 240 is displayed. At least one candidate picture and / or at least one candidate video are displayed on the second page 240. In response to the interaction operation in the second page, a reference picture is obtained. The star-shaped graphic in the reference picture is the reference object.

[0051] In some embodiments, the determining the blur kernel according to the reference object in the reference media data includes: determining the binarization result of the reference media data. According to the brightness values of the pixel points of the reference object in the binarization result, the weight matrix corresponding to the reference object is determined. The blur kernel is determined according to the weight matrix corresponding to the reference object.

[0052] When the reference media data is a black-and-white image, the black-and-white image is used as the binarization result of the reference media data. When the reference media data is a black-and-white video, the black-and-white video is used as the binarization result of the reference media data. When the reference media data is a color image or a color video, the reference media data is binarized to obtain the binarization result of the reference media data. Figure 3 It is a schematic diagram of a kind of reference media data provided by an embodiment of the present disclosure. As Figure 3 shown, the reference media data 310 is a black-and-white image, and the reference object is a smiling face 320.

[0053] In some embodiments, determining the weight matrix corresponding to the reference object according to the brightness values of the pixel points of the reference object in the binarization result includes: determining a first pixel point set and a second pixel point set in the binarization result, wherein the first pixel points in the first pixel point set represent the pixel points on the contour of the reference object, and the second pixel points in the second pixel point set represent the pixel points inside the contour of the reference object. According to the brightness value of the first pixel point, determine the weight of the first pixel point. According to the brightness value of the second pixel point, determine the weight of the second pixel point; according to the positions and weights of the first pixel point and the second pixel point, determine the weight matrix corresponding to the reference object.

[0054] Optionally, the brightness values can be normalized so that the value ranges of the brightness values of the first pixel point and the second pixel point are [0, 1], and the weights of the pixel points with brightness values close to 1 are greater than the weights of the pixel points with brightness values close to 0.

[0055] Since the positions of the elements in the weight matrix are determined based on the positions of the first pixel point and the second pixel point, and the first pixel point and the second pixel point represent the pixel points of the reference object, the shape of the blur kernel represented by the weight matrix is associated with the shape of the reference object. For example, if the reference object is a smiling face, the shape of the blur kernel is also a smiling face. If the reference object is a heart shape, the shape of the blur kernel is also a heart shape.

[0056] Taking the reference object as a smiling face as an example, the pixel points on the contour of the reference object can be obtained through an edge extraction algorithm to obtain the first pixel point set. The first pixel point set includes a plurality of first pixel points. Figure 4 It is a schematic diagram of a kind of first pixel point set provided by an embodiment of the present disclosure. As Figure 4 shown, the first pixel point set represents the edge contour of the smiling face. The pixel points inside the contour of the reference object are sampled to obtain the second pixel point set. The second pixel point set includes a plurality of second pixel points. Figure 5 It is a schematic diagram of a kind of second pixel point set provided by an embodiment of the present disclosure. As Figure 5As shown, there are jagged edges on the sampled smiling face. Figure 6 This is a combined diagram of a first pixel point set and a second pixel point set provided by an embodiment of the present disclosure. As Figure 6 shown, by fusing the first pixel point set and the second pixel point set, the jagged edges on the smiling face can be reduced.

[0057] In the embodiments of the present disclosure, the edge contour of the reference object in the reference media data and the area inside the edge contour are sampled separately, and then the pixel points sampled from the two parts are fused to obtain a sampling result, which can eliminate the jagged edges caused by fewer sampling times and balance the sampling performance and the visual effect of the sampling result.

[0058] Optionally, by fusing the first pixel point set and the second pixel point set, a sampling result of a binarized result can be obtained. According to the brightness values of the pixel points in the sampling result, the weights of the corresponding pixel points are determined. According to the positions and weights of the pixel points in the sampling result, a weight matrix corresponding to the reference object is determined.

[0059] Since the blur kernel of the lens blur is related to the brightness values of the pixel points in the sampling result, the greater the brightness value, the greater the weight occupied.

[0060] In the case of a single channel, according to the brightness value of the first pixel point in the sampling result, the weight of the first pixel point is determined. According to the brightness value of the second pixel point in the sampling result, the weight of the second pixel point is determined. According to the positions and weights of the first pixel point and the second pixel point, a weight matrix corresponding to the reference object is determined.

[0061] Optionally, the brightness value includes the brightness value associated with at least one color channel of the first pixel point or the second pixel point, and the weight matrix represents the weight matrix associated with the at least one color channel.

[0062] In some embodiments, the color channels of the first pixel point or the second pixel point include the R channel, the G channel, the B channel, etc. The brightness value associated with a color channel refers to the brightness value (or gray value) of the pixel point in the corresponding color channel. For example, if the color value of the first pixel point is (20, 150, 255), it means that the brightness value associated with the R color channel of the first pixel point is 20, the brightness value associated with the G color channel of the first pixel point is 150, and the brightness value associated with the B color channel of the first pixel point is 255.

[0063] For the R color channel, according to the brightness value associated with the R color channel of the first pixel point, the weight of the first pixel point in the weight matrix associated with the R color channel is determined. According to the brightness value associated with the R color channel of the second pixel point, the weight of the second pixel point in the weight matrix associated with the R color channel is determined. According to the positions and weights of the first pixel point and the second pixel point corresponding to the reference object, the weight matrix associated with the R color channel of the reference object is determined.

[0064] For the G color channel, determine the weight of the first pixel in the weight matrix associated with the G color channel according to the luminance value associated with the first pixel and the G color channel. Determine the weight of the second pixel in the weight matrix associated with the G color channel according to the luminance value associated with the second pixel and the G color channel. Determine the weight matrix associated with the G color channel of the reference object according to the positions and weights of the first pixel and the second pixel corresponding to the reference object.

[0065] For the B color channel, determine the weight of the first pixel in the weight matrix associated with the B color channel according to the luminance value associated with the first pixel and the B color channel. Determine the weight of the second pixel in the weight matrix associated with the B color channel according to the luminance value associated with the second pixel and the B color channel. Determine the weight matrix associated with the B color channel of the reference object according to the positions and weights of the first pixel and the second pixel corresponding to the reference object.

[0066] It should be noted that according to the position of the first pixel or the second pixel, the position of the weight in the weight matrix can be determined. The position in the weight matrix refers to the row number and column number in the weight matrix.

[0067] In the case of multiple channels, the weight matrix associated with the R color channel of the reference object, the weight matrix associated with the G color channel of the reference object, and the weight matrix associated with the B color channel of the reference object are used as the blur kernel for lens blur. It should be noted that the above examples only take the RGB three channels as an example, and the above method for determining the weight matrix can also be applied to scenarios with four channels or more channels.

[0068] In some embodiments, determining the blur kernel according to the weight matrix corresponding to the reference object includes: adjusting at least some of the weights in the weight matrix corresponding to the reference object according to a preset adjustment coefficient, and determining the blur kernel according to the adjusted weight matrix. In the solution of this embodiment, multiplying each element in the weight matrix by the preset adjustment coefficient can adjust at least some of the weights in the weight matrix, and thus can adjust the effect of the light spot.

[0069] Wherein, the elements in the weight matrix represent the weights corresponding to the first pixel and the second pixel. The preset adjustment coefficient can be a coefficient set according to the expected light spot effect. For example, when the preset adjustment coefficient is 1, the weight matrix corresponding to the reference object is used as the blur kernel. When the preset adjustment coefficient is a coefficient less than 1, multiply the set elements in the weight matrix corresponding to the reference object by the preset adjustment coefficient to obtain the blur kernel. For example, by reducing the weight corresponding to the second pixel in the weight matrix with a coefficient less than 1, a hollow light spot can be obtained. By increasing the weight corresponding to the first pixel in the weight matrix with a coefficient greater than 1, a light spot with clear edges can be obtained, etc.

[0070] S130. Perform blurring processing on the original media data based on the blur kernel to obtain target media data, and display the target media data on the first page.

[0071] Among them, blurring processing is an image processing technology that weakens image details. In the embodiments of the present disclosure, blurring processing includes lens blurring processing, etc. The target media data is the result of blurring processing of the original media data. The shape of the light spot in the target media data is related to the shape of the blur kernel. For example, if the shape of the blur kernel is a smiling face, then the shape of the light spot in the target media data is also a smiling face. Figure 7 It is a schematic diagram of a kind of target media data provided by the embodiments of the present disclosure. As Figure 7 shown, the shape of the light spot in the target media data is a smiling face.

[0072] Exemplarily, based on the weight matrix associated with the at least one color channel, perform convolution processing on the luminance values of the corresponding color channels of the original media data to obtain the convolution results of the at least one color channel of the original media data. Determine the target media data according to the convolution results of the at least one color channel of the original media data.

[0073] For the single-channel case, perform convolution processing on the luminance values of the local area in the original media data based on the weight matrix to obtain the luminance values of the pixel points in the target media data. Determine the target media data based on the luminance values of each pixel point in the target media data. Among them, the local area represents an area with the same shape as the blur kernel represented by the weight matrix.

[0074] For the multi-channel case, perform convolution processing on the luminance values of the R color channel in the original media data based on the weight matrix associated with the R color channel to obtain the luminance values of the R color channel of the pixel points in the target media data. Perform convolution processing on the luminance values of the G color channel in the original media data based on the weight matrix associated with the G color channel to obtain the luminance values of the G color channel of the pixel points in the target media data. Perform convolution processing on the luminance values of the B color channel in the original media data based on the weight matrix associated with the B color channel to obtain the luminance values of the B color channel of the pixel points in the target media data. Determine the target media data based on the luminance values of each pixel point in the target media data corresponding to the R color channel, G color channel, and B color channel respectively.

[0075] In the technical solution of the embodiment of the present disclosure, the original media data is displayed on the first page. In response to an interaction operation on the first page, reference media data is obtained, a blur kernel is determined according to a reference object in the reference media data, and the original media data is blurred according to the blur kernel to obtain target media data, and the target media data is displayed on the first page. Since the shape of the blur kernel is associated with the reference object, different shapes of blur kernels can be determined according to different reference objects. The embodiment of the present disclosure solves the problem of the lack of a blur solution for flexibly selecting the shape of the blur kernel in the related art, optimizes the lens blur solution of the media data, and realizes the flexible selection of the shape of the blur kernel. Since the light spot in the target media data generated based on the blur kernel is associated with the shape of the blur kernel, by flexibly selecting the shape of the blur kernel, the picture effect of the target media data is enriched.

[0076] Figure 8 FIG. 4 is a schematic flowchart of another method for processing media data provided by an embodiment of the present disclosure. On the basis of the above embodiments, the embodiment of the present disclosure additionally defines an update step of the blur kernel.

[0077] As Figure 8 shown, the method includes:

[0078] S810. Display the original media data on the first page.

[0079] S820. In response to the interaction operation on the first page, obtain reference media data, and determine a blur kernel according to a reference object in the reference media data, where the shape of the blur kernel is associated with the reference object.

[0080] Exemplarily, in response to a material selection operation on the first page, a reference diagram is obtained. The material selection operation includes drawing a reference diagram, taking a reference diagram, or uploading a reference diagram, etc. The reference diagram includes a reference object. Optionally, in response to the material selection operation on the first page, a second page may be displayed. The second page may be a local media resource library page, and candidate media data is displayed on the local media resource library page. Or, the second page may also be a drawing page, and a reference diagram is obtained through the drawing page. Or, the second page may also be a shooting page, and a reference diagram is obtained through the shooting page.

[0081] Determine the binarization result of the reference diagram. According to the brightness values of the pixel points of the reference object in the binarization result, determine the weight matrix corresponding to the reference object.

[0082] Optionally, a weight matrix corresponding to the reference object is determined according to the brightness values of the pixel points of the reference object in the binarization result, including: determining a first pixel point set and a second pixel point set in the binarization result, where the first pixel points in the first pixel point set represent the pixel points on the contour of the reference object, and the second pixel points in the second pixel point set represent the pixel points inside the contour of the reference object. The weight of the first pixel point is determined according to the brightness value of the first pixel point. The weight of the second pixel point is determined according to the brightness value of the second pixel point. The weight matrix corresponding to the reference object is determined according to the positions and weights corresponding to the first pixel points and the second pixel points.

[0083] At least some of the weights in the weight matrix corresponding to the reference object are adjusted according to a preset adjustment coefficient, and a blur kernel is determined according to the adjusted weight matrix.

[0084] S830. The original media data is blurred based on the blur kernel to obtain target media data, and the target media data is displayed on the first page.

[0085] Optionally, the brightness value includes the brightness value associated with at least one color channel of the first pixel point or the second pixel point, and the weight matrix represents the weight matrix associated with the at least one color channel.

[0086] Exemplarily, based on the weight matrix associated with the at least one color channel, convolution processing is performed on the brightness value of the corresponding color channel of the original media data to obtain a convolution result of at least one color channel of the original media data. The target media data is determined according to the convolution result of at least one color channel of the original media data.

[0087] S840. A second control is displayed on the first page, where the second control is used to adjust the weights of at least some of the second pixel points. In response to a trigger operation of the second control, the filling content of the light spot in the target media data is updated to obtain updated target media data.

[0088] Exemplarily, in response to the trigger operation of the second control, a weight adjustment amount of at least some of the second pixel points is determined, the weight matrix is updated according to the weight adjustment amount to obtain an updated weight matrix. The original media data is blurred based on the updated weight matrix to obtain updated target media data.

[0089] In some embodiments, in response to a triggering operation of a second control, a weight adjustment amount and an adjustment range of the second pixel are determined. When the adjustment range is a full-scale adjustment, the weight corresponding to the second pixel in the weight matrix is updated according to the weight adjustment amount to obtain an updated weight matrix. When the adjustment range is a partial adjustment, the weights of the second pixels in the local area of the weight matrix are updated according to the weight adjustment amount to obtain an updated weight matrix.

[0090] For example, the second control can be a control that represents the weight adjustment amount by a sliding amount. Alternatively, the second control can include weight adjustment amount options, etc. Optionally, the second control includes at least one sub-control, and the sub-control is associated with pixels in different regions of the reference object. For example, the second control includes a first sub-control and a second sub-control. Among them, the first sub-control is associated with the edge contour region of the blur kernel represented by the weight matrix. The second sub-control is associated with the region inside the contour of the blur kernel.

[0091] The determining, in response to the triggering operation of the second control, a weight adjustment amount of at least some second pixels, and updating the weight matrix according to the weight adjustment amount to obtain an updated weight matrix includes:

[0092] In response to the triggering operation of at least one sub-control, a weight adjustment range is determined according to the region associated with the sub-control. And, the weight adjustment amount is determined according to the sliding amount or option associated with the sub-control. According to the weight adjustment range and the weight adjustment amount, the weights of the pixels in the corresponding region of the weight matrix are updated to obtain an updated weight matrix.

[0093] Performing a convolution process on the brightness value of the original media data based on the updated weight matrix to obtain updated target media data.

[0094] S850. Display the updated target media data on the first page.

[0095] The technical solution of the embodiments of the present disclosure, by responding to the triggering operation of the second control, determines the weight adjustment amount of at least some second pixels, updates the corresponding weights in the weight matrix according to the weight adjustment amount to obtain an updated weight matrix, and then performs a blur process on the original media data based on the updated weight matrix to obtain updated target media data, so as to display the updated target media data on the first page. Through the embodiments of the present disclosure, a convenient scheme for modifying the blur kernel can be realized. Furthermore, the effect of the light spot in the target media data displayed on the first page can be adjusted, further enriching the picture effect.

[0096] Figure 9The following is a schematic structural diagram of a processing device for media data provided by an embodiment of the present disclosure. The device can be implemented in the form of software and / or hardware. Optionally, it is implemented by an electronic device, which can be a mobile terminal, a PC terminal, a server, etc. As Figure 9 shown, the device includes: a display module 910, a weight matrix determination module 920, and a blur processing module 930.

[0097] The display module 910 is configured to display the original media data on a first page;

[0098] The weight matrix determination module 920 is configured to, in response to an interaction operation in the first page, obtain reference media data, and determine a blur kernel according to a reference object in the reference media data, where the shape of the blur kernel is associated with the reference object;

[0099] The blur processing module 930 is configured to perform blur processing on the original media data based on the blur kernel to obtain target media data, and display the target media data on the first page, where the shape of the light spot in the target media data is associated with the reference object.

[0100] Optionally, the weight matrix determination module 920 is specifically configured to:

[0101] Also display a first control on the first page;

[0102] In response to a trigger operation of the first control, display a second page, where the second page includes candidate media data, and the candidate media data includes the reference media data;

[0103] In response to an interaction operation in the second page, obtain the reference media data.

[0104] Optionally, the weight matrix determination module 920 is further specifically configured to:

[0105] Determine the binarization result of the reference media data;

[0106] According to the brightness values of the pixel points of the reference object in the binarization result, determine the weight matrix corresponding to the reference object;

[0107] Determine the blur kernel according to the weight matrix corresponding to the reference object.

[0108] Optionally, the determining the weight matrix corresponding to the reference object according to the brightness values of the pixel points of the reference object in the binarization result includes:

[0109] Determine a first pixel point set and a second pixel point set in the binarization result, where the first pixel points in the first pixel point set represent the pixel points on the contour of the reference object, and the second pixel points in the second pixel point set represent the pixel points inside the contour of the reference object;

[0110] Determine the weight of the first pixel point according to the brightness value of the first pixel point;

[0111] Determine the weight of the second pixel point according to the brightness value of the second pixel point;

[0112] Determine the weight matrix corresponding to the reference object according to the positions and weights corresponding to the first pixel points and the second pixel points.

[0113] Optionally, the brightness value includes the brightness value associated with at least one color channel of the first pixel point or the second pixel point, and the weight matrix represents the weight matrix associated with the at least one color channel.

[0114] Optionally, the blurring processing module 930 is specifically configured to:

[0115] Perform convolution processing on the brightness value of the corresponding color channel of the original media data based on the weight matrix associated with the at least one color channel to obtain the convolution result of at least one color channel of the original media data;

[0116] Determine the target media data according to the convolution result of at least one color channel of the original media data.

[0117] Optionally, the determining the blur kernel according to the weight matrix corresponding to the reference object includes:

[0118] Adjust at least some of the weights in the weight matrix corresponding to the reference object according to a preset adjustment coefficient, and determine the blur kernel according to the adjusted weight matrix.

[0119] Optionally, the first page further includes a second control, and the second control is used to adjust the weights of at least some of the second pixel points, and further includes:

[0120] In response to the triggering operation of the second control, update the filling content of the light spot in the target media data to obtain the updated target media data;

[0121] Display the updated target media data on the first page.

[0122] Optionally, the updating the filling content of the light spot in the target media data in response to the triggering operation of the second control to obtain the updated target media data includes;

[0123] In response to the triggering operation of the second control, determine the weight adjustment amount of at least some of the second pixel points, and update the weight matrix according to the weight adjustment amount to obtain an updated weight matrix;

[0124] Perform blurring processing on the original media data based on the updated weight matrix to obtain updated target media data.

[0125] The media data processing device provided by the embodiments of the present disclosure can execute the media data processing method provided by any embodiment of the present disclosure, and has corresponding functional modules and beneficial effects for executing the method.

[0126] It should be noted that the various units and modules included in the above device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present disclosure.

[0127] Figure 10 It is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. The following reference Figure 10 , which shows a schematic structural diagram of an electronic device 1000 suitable for implementing the embodiments of the present disclosure (such as Figure 10 the terminal device or server in). The terminal device in the embodiments 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), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 10 The electronic device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0128] As Figure 10 shown, the electronic device 1000 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1001, which may execute 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 through a bus 1004. The editing / output (I / O) interface 1005 is also connected to the bus 1004.

[0129] Typically, the following devices can be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device 1000 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 10 the electronic device 1000 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices can be alternatively implemented or had.

[0130] Specifically, 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 codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0131] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0132] The electronic device provided by the embodiment of the present disclosure and the method for processing media data provided by the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0133] The embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for processing media data provided by the above embodiment is implemented.

[0134] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can 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, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various 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 the computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0135] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0136] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.

[0137] The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device is caused to:

[0138] Display the original media data on the first page;

[0139] In response to an interaction operation in the first page, obtain reference media data, and determine a blur kernel according to a reference object in the reference media data, where the shape of the blur kernel is associated with the reference object;

[0140] Perform blur processing on the original media data based on the blur kernel to obtain target media data, and display the target media data on the first page.

[0141] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of 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 (for example, by using an Internet service provider to connect through the Internet).

[0142] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0143] The units involved in the embodiments of the present disclosure may be implemented in software or in hardware. Among them, the name of the unit does not constitute a limitation on the unit itself in some cases. For example, the first acquisition unit may also be described as "the unit for acquiring at least two Internet protocol addresses".

[0144] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.

[0145] In the context of this disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0146] The above description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in the present disclosure.

[0147] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0148] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A method for processing media data, characterized in that: include: Display the original media data on the first page; In response to an interactive operation in the first page, obtaining reference media data, and determining a blur kernel according to a reference object in the reference media data, wherein a shape of the blur kernel is associated with the reference object; The original media data is fuzzy processed based on the fuzzy core to obtain target media data, and the target media data is displayed on the first page.

2. The method according to claim 1, characterized in that The acquiring of reference media data in response to the interactive operation in the first page includes: A first control is also displayed in the first page; In response to the triggering operation of the first control, displaying a second page, wherein the second page includes candidate media data, and the candidate media data includes the reference media data; In response to the interactive operation in the second page, the reference media data is acquired.

3. The method according to claim 1 or 2, characterized in that: The determining of the blur kernel according to the reference object in the reference media data comprises: Determining a binarization result of the reference media data; Determining a weight matrix corresponding to the reference object according to the brightness values ​​of the pixels of the reference object in the binarization result; The blur kernel is determined according to a weight matrix corresponding to the reference object.

4. The method according to claim 3, characterized in that The step of determining a weight matrix corresponding to the reference object according to the brightness values ​​of the pixels of the reference object in the binarization result includes: Determine a first pixel point set and a second pixel point set in the binarization result, wherein the first pixel points in the first pixel point set represent pixel points on the contour of the reference object, and the second pixel points in the second pixel point set represent pixel points within the contour of the reference object; Determining a weight of the first pixel according to a brightness value of the first pixel; Determining a weight of the second pixel according to a brightness value of the second pixel; A weight matrix corresponding to the reference object is determined according to positions and weights corresponding to the first pixel point and the second pixel point.

5. The method according to claim 4, characterized in that The brightness value includes a brightness value of a first pixel point or a second pixel point associated with at least one color channel, and the weight matrix represents a weight matrix associated with the at least one color channel.

6. The method according to claim 5, characterized in that The fuzzy processing of the original media data based on the fuzzy kernel to obtain target media data includes: Based on the weight matrix associated with the at least one color channel, performing convolution processing on the brightness value of the color channel corresponding to the original media data to obtain a convolution result of the at least one color channel of the original media data; The target media data is determined according to a convolution result of at least one color channel of the original media data.

7. The method according to claim 3, characterized in that The determining the blur kernel according to the weight matrix corresponding to the reference object comprises: At least part of the weights in the weight matrix corresponding to the reference object are adjusted according to a preset adjustment coefficient, and the blur kernel is determined according to the adjusted weight matrix.

8. The method according to claim 5, characterized in that The first page further includes a second control, the second control is used to adjust the weight of at least part of the second pixel points, and further includes: In response to the triggering operation of the second control, updating the filling content of the light spot in the target media data to obtain updated target media data; The updated target media data is displayed on the first page.

9. The method according to claim 8, characterized in that The updating of the filling content of the light spot in the target media data in response to the triggering operation of the second control to obtain the updated target media data comprises: In response to the triggering operation of the second control, determining weight adjustment amounts of at least part of the second pixel points, and updating the weight matrix according to the weight adjustment amounts to obtain an updated weight matrix; The original media data is fuzzy processed based on the updated weight matrix to obtain updated target media data.

10. A media data processing device, characterized in that: include: A display module, used to display the original media data on the first page; a weight matrix determination module, configured to obtain reference media data in response to an interactive operation in the first page, and determine a blur kernel according to a reference object in the reference media data, wherein a shape of the blur kernel is associated with the reference object; A fuzzy processing module is used to perform fuzzy processing on the original media data based on the fuzzy kernel to obtain target media data, and display the target media data on the first page, wherein the shape of the light spot in the target media data is associated with the reference object.

11. 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-9.

12. 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 according to any one of claims 1 to 9.

13. A computer program product, characterized in that It comprises a computer program, characterized in that when the computer program is executed by a processor, it implements the method for processing media data as described in any one of claims 1-9.