Multimedia content processing method and apparatus, and electronic device and storage medium
By distorting, scaling and attribute adjustment operations on the original multimedia content, generating and superimposing target special effect materials, the problems of low efficiency and low accuracy of light spot special effect processing in the existing technology are solved, and efficient light spot special effect addition and rich display effects are achieved.
Patent Information
- Application Number
- PCT/CN2024/138731
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-28
- Filing Date
- 2024-12-12
- Publication Date
- 2025-07-03
AI Technical Summary
When adding light spot special effects to video or picture processing, the prior art requires professional skills and low processing efficiency and low accuracy.
By obtaining the original multimedia content and target parameters, performing distortion, scaling and attribute adjustment operations, generating target special effect materials, and superimposing them to the original multimedia content according to the overlay mode, achieving a spot or radiant effect.
It improves the accuracy and efficiency of multimedia content processing, enriches the content display effect, and improves the user interaction experience.
Smart Images

Figure CN2024138731_03072025_PF_FP_ABST
Abstract
Description
Multimedia content processing method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of Chinese Patent Application No. 202311844312.6 filed on December 28, 2023. The entire teachings of the above application are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to image processing technology, and more particularly to a method, device, electronic device, and storage medium for processing multimedia content. Background Art
[0004] In video editing or image processing scenarios, it is often necessary to add special effects to video frames or images to enrich the presentation. For example, adding light spot effects to a video or image can create a special atmosphere.
[0005] Currently, light effects are created by manually adjusting the brightness of certain pixels in the original image using image editing software. For example, the brightness of pixels that need to glow in the original image is adjusted to create a glowing effect. However, this method requires the user to possess professional image processing skills and requires repeated brightness adjustments to achieve the desired light effect. This leads to low image processing accuracy and processing efficiency. Summary of the Invention
[0006] The present disclosure provides a method, device, electronic device and storage medium for processing multimedia content.
[0007] In a first aspect, an embodiment of the present disclosure provides a method for processing multimedia content, including:
[0008] Acquiring original multimedia content and target parameters, wherein the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger a distortion operation, a scaling operation, and an attribute adjustment operation;
[0009] performing a distortion operation on the original multimedia content to obtain distorted content, performing a scaling operation on the distorted content to obtain special effect content, and performing an attribute adjustment operation on the special effect content to obtain attribute-adjusted content, wherein the special effect content includes target special effect material;
[0010] The attribute adjustment content is superimposed on the original multimedia content according to the superposition mode to obtain the target multimedia content.
[0011] In a second aspect, an embodiment of the present disclosure further provides a multimedia content processing device, the device comprising:
[0012] A content acquisition module, configured to acquire original multimedia content and target parameters, wherein the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger distortion operations, scaling operations, and attribute adjustment operations;
[0013] a content adjustment module, configured to perform a distortion operation on the original multimedia content to obtain distorted content, perform a scaling operation on the distorted content to obtain special effect content, and perform an attribute adjustment operation on the special effect content to obtain attribute-adjusted content, wherein the special effect content includes target special effect material;
[0014] The content superposition module is configured to superimpose the attribute adjustment content onto the original multimedia content according to the superposition mode to obtain target multimedia content.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing multimedia content as described in any embodiment of the present disclosure.
[0019] 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 method for processing multimedia content as described in any embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. 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 that the originals and elements are not necessarily drawn to scale.
[0021] FIG1 is a schematic flow chart of a method for processing multimedia content provided by an embodiment of the present disclosure;
[0022] FIG2 is a schematic diagram of the positional relationship between a reference line and a dividing line provided by an embodiment of the present disclosure;
[0023] FIG3 is a flow chart of another method for processing multimedia content provided by an embodiment of the present disclosure;
[0024] FIG4 is a schematic structural diagram of a multimedia content processing device provided by an embodiment of the present disclosure;
[0025] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0027] 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.
[0028] As used herein, the term "including" and its variations are open-ended, 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," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0029] It should be noted that the concepts of "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.
[0030] It should be noted that the modifications of "one" and "multiple" 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, they should be understood as "one or more".
[0031] 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.
[0032] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0033] Figure 1 is a flow chart of a method for processing multimedia content provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of producing light spot special effects. The method can be executed by a multimedia content 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, PC or server, etc.
[0034] As shown in FIG1 , the method includes:
[0035] S110: Acquire original multimedia content and target parameters.
[0036] The target parameters include content adjustment parameters and an overlay mode. The content adjustment parameters are used to trigger distortion operations, scaling operations, and attribute adjustment operations. The original multimedia content represents the multimedia content to which the target special effect material is to be added. For example, the original multimedia content may include a video or an image. The target special effect material may be used to represent special effect material that presents light spots or glow effects.
[0037] The overlay mode is used to characterize the method of overlaying the target special effects material after attribute adjustment onto the original multimedia content. For example, the overlay mode may include adding the brightness values of the corresponding pixels of the original multimedia content and the attribute adjustment content to obtain the brightness value of the pixel. Alternatively, the larger brightness value of the corresponding pixels of the original multimedia content and the attribute adjustment content is used as the brightness value of the pixel. Alternatively, a first difference between the brightness value of the pixel in the original multimedia content and 1 is determined, and a second difference between the brightness value of the same pixel in the attribute adjustment content and 1 is determined, and the brightness value of the pixel is determined based on the first difference and the second difference.
[0038] The distortion operation is used to distort the original multimedia content to obtain distorted content. The distortion can be achieved by adjusting the coordinates of the pixels in the original multimedia content. Specifically, the original multimedia content can be subjected to fisheye lens distortion or square distortion, for example.
[0039] The zoom operation is used to scale the distorted content to produce special effects content. The zoom operation can be achieved by adjusting the coordinates of the pixels in the distorted content. The zoom ratio corresponding to the zoom operation can be determined by adjusting the visible range.
[0040] The attribute adjustment operation is used to adjust the attributes of the special effect content, resulting in attribute adjustment content. Attribute adjustment can be achieved by adjusting the brightness values of the pixels in the special effect content. For example, the brightness coefficient of each pixel can be calculated based on the pixel coordinates, the coordinates of the distortion center, the visible range, and the brightness parameter. The brightness coefficient is then multiplied by the brightness value of the corresponding pixel to adjust the pixel's brightness value.
[0041] Exemplarily, original multimedia content and target parameters input in the interactive interface are obtained, wherein the target parameters include at least one of distortion center coordinates, visual range, distortion center attributes, brightness parameters, and overlay mode.
[0042] The distortion center coordinates represent the location of the light source center. The visible range is used to control the length and spread of the light emitted by the light source. The light represents the effect of light emitted from the light source and passing through the original multimedia content. A smaller visible range produces more concentrated and noticeable light, while a larger visible range causes the light to spread out and expand, visually appearing to stretch or distort the original multimedia content. The distortion center attributes represent attribute information of the light source center. For example, the distortion center attributes include shape parameters and angle parameters. The shape parameters can represent the shape of the light source center. The angle parameters can represent the rotation angle of the light source center. For example, if the shape of the light source center is circular, the original multimedia content is distorted using a fisheye lens. If the shape of the light source center is square, the original multimedia content is distorted using a square shape.
[0043] The brightness parameter is used to characterize the global brightness. The global brightness is related to the visible range. As the visible range decreases, the overall brightness of the image decreases. Conversely, the overall brightness of the image increases.
[0044] It should be noted that if the original multimedia content is a video, the distortion operation, scaling operation, and attribute adjustment operation provided by the embodiments of the present disclosure are performed on each video frame in the video.
[0045] S120: Perform a distortion operation on the original multimedia content to obtain distorted content, perform a scaling operation on the distorted content to obtain special effect content, and perform an attribute adjustment operation on the special effect content to obtain attribute adjusted content.
[0046] The special effects content includes target special effects material. For example, the target feature material may include a light spot effect or a light ray effect. By adjusting the visible range to control the length of the light emitted from the center of the light source, switching between the light spot effect and the light ray effect can be achieved. Furthermore, by adjusting the position of the light source center to move the light spot along the boundary of the target object, a light spot stroke effect can be achieved.
[0047] Distorted content can represent multimedia content that has been distorted by the original multimedia content. For example, if the original multimedia content is an image, the distorted content can represent the distorted image. If the original multimedia content is a video, the distorted content can represent distorted video frames that have been distorted by the distortion processing performed on each video frame in the video. Distortion processing methods can include fisheye lens distortion or square distortion.
[0048] The special effect content may represent multimedia content after the distorted content has been stretched and scaled. The stretching and scaling of the distorted content may be achieved by adjusting the viewing range.
[0049] The attribute adjustment content can represent multimedia content after global brightness limiting has been applied to the special effects content. Because the visible range controls the extent of light spread from a light source, a smaller visible range corresponds to lower global brightness. Therefore, a brightness coefficient is calculated based on the visible range, pixel coordinates, distortion center coordinates, and brightness parameters. This brightness coefficient is then used to adjust the brightness value of the pixel, resulting in the attribute adjustment content. This attribute adjustment content has a brightness effect corresponding to the visible range.
[0050] In some embodiments, performing a distortion operation on the original multimedia content to obtain distorted content includes:
[0051] A distortion type is determined based on the shape parameter in the distortion center attribute, where the distortion type includes a first distortion type and a second distortion type. For the first distortion type, a distortion operation is performed on the original multimedia content based on the distortion center coordinates to obtain distorted content. Alternatively, for the second distortion type, a distortion operation is performed on the original multimedia content based on the angle parameter in the distortion center attribute to obtain distorted content.
[0052] If the shape parameter is circular, the distortion type is the first distortion type, which indicates that fisheye lens distortion processing is performed on the original multimedia content. If the shape parameter is square, the distortion type is the second distortion type, which indicates that square distortion processing is performed on the original multimedia content.
[0053] In an embodiment of the present disclosure, for the first distortion type, performing a distortion operation on the original multimedia content according to the distortion center coordinates to obtain distorted content includes:
[0054] For the first distortion type, a first distortion coefficient corresponding to a first pixel in the original multimedia content is determined based on the coordinates of the first pixel and the coordinates of the distortion center. The coordinates of the first pixel are adjusted based on the coordinates of the distortion center and the first distortion coefficient to obtain distorted content. The first pixel may be a pixel in the original multimedia content. The first distortion coefficient may represent the distortion coefficient used to distort the original multimedia content. The coordinates of the first pixel are adjusted using the distortion coefficient corresponding to the first pixel.
[0055] Taking multimedia content as an image as an example, the fisheye lens distortion processing of the original image includes: assuming that the coordinates of the pixel point in the original image are (x o ,y o ), the coordinates of the lens’s distortion center (focus) are (Cx ,C y ), the focal length is f x , f y , then determine the distance between the pixel point in the original image and the coordinates of the distortion center, and normalize the distance according to the focal length to obtain (X n , Y n ), X n , Y n The coordinates of the optical center are the main point. Then, determine (X n , Y n ) The target distance R from the main point n According to the target distance R n Determine the distortion coefficient k ratio , you can use the R n The target polynomial calculation k ratio According to the normalized coordinates (X n , Y n ), distortion coefficient k ratio , focal length f x 、f y And the distortion center coordinates (C x ,C y ), calculate the image coordinates after dedistortion (X u , Y u ). For example, you can n Divide by k ratio The value of f x Multiply to get the first product, and multiply the first product by C x Add up to get X u . You can use Y n Divide by k ratio The value of f y Multiply the second product and add C y Add up to get Y u .
[0056] In an embodiment of the present disclosure, for the second distortion type, performing a distortion operation on the original multimedia content according to the angle parameter in the distortion center attribute to obtain distorted content includes:
[0057] For the second distortion type, a baseline and a dividing line are determined based on the angle parameter in the distortion center attribute. The original multimedia content is divided into content blocks based on the dividing line, and a first distance between the coordinates of a second pixel point in the content block and the baseline is determined. A second distortion coefficient corresponding to the second pixel point is determined based on the first distance. The coordinates of the second pixel point are adjusted based on the second distortion coefficient to obtain distorted content.
[0058] The baseline is used to calculate the distortion coefficient corresponding to a pixel in the original multimedia content. For example, the distortion coefficient can be determined based on the distance between the pixel and the baseline. The segmentation line is used to segment the original multimedia content into content blocks. The baseline can be determined based on the angle parameter in the distortion center attribute. The segmentation line is then determined based on the position of the baseline according to a preset angular relationship between the baseline and the segmentation line.
[0059] Taking multimedia content as an image as an example, performing square distortion processing on the original image includes: obtaining an angle parameter, the value range of the angle parameter can be any angle from 0 degrees to 360 degrees, which is used to represent the tilt of the center of the light source. Since the tilt effect is cycled with 90 degrees, the angle parameter D can be converted into an angle value Dˊ in the range of 0-90 degrees. For example, if the angle parameter is 135 degrees, the angle value converted to the range of 0-90 degrees is 45 degrees. The baseline is two mutually perpendicular line segments. For example, the baseline includes a first baseline and a second baseline, and the angle between the first baseline and the horizontal line is Dˊ. The dividing line is two mutually perpendicular line segments. For example, the dividing line includes a first dividing line and a second dividing line, and the angle between the first dividing line and the first baseline satisfies a preset angle relationship.
[0060] Figure 2 is a schematic diagram illustrating the positional relationship between a reference line and a dividing line provided in an embodiment of the present disclosure. As shown in Figure 2, the angle between the first reference line 210 and the horizontal line is Dˊ, and the second reference line 220 is perpendicular to the first reference line 210. The angle between the first dividing line 230 and the first reference line 210 is 45 degrees, and the second dividing line 240 is perpendicular to the first dividing line 230. The first reference line 210, the second reference line 220, the first dividing line 230, and the second dividing line 240 intersect at the center of distortion.
[0061] Since the first dividing line 230 and the second dividing line 240 divide the original image into four quadrants, each quadrant represents an image block, namely the first image block 250 corresponding to the first quadrant, the second image block 260 corresponding to the second quadrant, the third image block 270 corresponding to the third quadrant, and the fourth image block 280 corresponding to the fourth quadrant.
[0062] For pixels located in the first and third quadrants, the distortion coefficient can be determined based on the distance between the pixel and the first reference line 210. For pixels located in the second and fourth quadrants, the distortion coefficient can be determined based on the distance between the pixel and the second reference line 220. For example, for a second pixel in the first image block 250, a first distance between the second pixel's coordinates and the first reference line 210 is determined, and the first distance is used as the second distortion coefficient corresponding to the second pixel. Alternatively, for a second pixel in the second image block 260, a first distance between the second pixel's coordinates and the second reference line 220 is determined, and the first distance is used as the second distortion coefficient corresponding to the second pixel. Alternatively, for a second pixel in the third image block 270, a first distance between the second pixel's coordinates and the first reference line 210 is determined, and the first distance is used as the second distortion coefficient corresponding to the second pixel. Alternatively, for a second pixel in the fourth image block 280, a first distance between the second pixel's coordinates and the second reference line 220 is determined, and the first distance is used as the second distortion coefficient corresponding to the second pixel. The coordinates of the second pixel are adjusted based on the second distortion coefficient to obtain the distorted content.
[0063] It should be noted that if the multimedia content is a video, the above-mentioned distortion processing is performed on each video frame in the video.
[0064] In some embodiments, performing a scaling operation on the distorted content to obtain the special effect content includes: determining, for a third pixel in the distorted content, a second distance between coordinates of the third pixel and coordinates of a distortion center; and adjusting the coordinates of the third pixel based on the second distance and a visible range to obtain the special effect content.
[0065] For example, the second distance between each third pixel point in the distorted content and the coordinates of the distortion center is calculated, the base a is determined according to the second distance, the exponent n is determined according to the visible range, and the power operation result a is obtained. n , multiplying the coordinate value of the third pixel by the power operation result to obtain the new coordinate value of the third pixel. Optionally, the above coordinate adjustment process of the third pixel is iteratively performed to obtain special effect content.
[0066] In some embodiments, performing an attribute adjustment operation on the special effects content to obtain the attribute adjustment content includes: determining, for a fourth pixel in the special effects content, a distance parameter based on a third distance between the coordinates of the fourth pixel and the coordinates of the distortion center and a visible range; determining a brightness coefficient corresponding to the fourth pixel based on the distance parameter, the visible range, and a brightness parameter; and adjusting the brightness of the fourth pixel based on the brightness coefficient to obtain the attribute adjustment content.
[0067] For example, for a fourth pixel in the special effects content, a third distance between the coordinates of the fourth pixel and the coordinates of the distortion center is determined, a difference between the third distance and the visible range is determined, and a first preset value is obtained, where the first preset value is a pre-set value. The difference is compared with the first preset value, and the larger value is used as the distance parameter, where the difference represents the result of a subtraction operation between the third distance and the visible range.
[0068] Obtain a second preset value, where the second preset value is a pre-set value. Determine a comparison value based on the larger of the visible range and the second preset value and the distance parameter. Calculate a brightness coefficient corresponding to a fourth pixel using the larger of the comparison value and the second preset value as the denominator and the brightness parameter as the numerator. Multiply the brightness coefficient by the brightness value of the fourth pixel to obtain attribute adjustment content.
[0069] S130 : Superimpose the attribute adjustment content onto the original multimedia content according to the superposition mode to obtain target multimedia content.
[0070] The target multimedia content is multimedia content to which target special effect materials are added and whose pixel brightness corresponds to the visible range.
[0071] For example, for a pixel in the original multimedia content, the brightness values of the pixel in the original multimedia content and the attribute adjustment content are obtained respectively, and the brightness values of the same pixel in the original multimedia content and the attribute adjustment content are added together to obtain the target multimedia content.
[0072] Optionally, for a pixel in the original multimedia content, brightness values of the pixel in the original multimedia content and the attribute-adjusted content are obtained, respectively. The brightness values of the same pixel in the original multimedia content and the attribute-adjusted content are compared, and the larger brightness value is used as the brightness value of the pixel to obtain the target multimedia content.
[0073] Optionally, for a pixel in the original multimedia content, brightness values of the pixel in the original multimedia content and the attribute-adjusted content are obtained, respectively. A first difference between the brightness value of the pixel in the original multimedia content and 1 is determined, and a second difference between the brightness value of the same pixel in the attribute-adjusted content and 1 is determined. The brightness value of the pixel is determined based on the first difference and the second difference, thereby obtaining the target multimedia content.
[0074] Optionally, after determining the target multimedia content, the target multimedia content is displayed through an interactive interface. If an adjustment operation on the target parameter is detected, the adjusted target parameter is obtained, and the changed content adjustment parameter and / or overlay mode in the new target parameter is parsed. If the content adjustment parameter changes, the changed parameter in the distortion center coordinates, visual range, distortion center attribute or brightness parameter is determined. If the distortion center coordinates change, the distortion operation, zoom operation and attribute adjustment operation are triggered to be executed again. If the visual range changes, the zoom operation and attribute adjustment operation are triggered to be executed again. If the distortion center attribute changes, the distortion operation is triggered to be executed again. If the brightness parameter changes, the attribute adjustment operation is triggered to be executed again. If the overlay mode changes, the attribute adjustment content is superimposed on the original multimedia content according to the adjusted overlay mode to obtain the target multimedia content.
[0075] The technical solution of the disclosed embodiment obtains original multimedia content and target parameters, performs a distortion operation on the original multimedia content based on the target parameters to obtain distorted content, then performs a scaling operation on the distorted content to obtain special effect content, performs an attribute adjustment operation on the special effect content to obtain attribute-adjusted content, and superimposes the attribute-adjusted content on the original multimedia content to obtain target multimedia content. This enables generation of target special effect material based on the original multimedia content, superimposing the target special effect material on the original multimedia content, and obtaining target multimedia content with the target special effect added thereto, thereby enriching the content display effect and improving the accuracy and efficiency of multimedia content processing.
[0076] FIG3 is a flow chart of another method for processing multimedia content provided by an embodiment of the present disclosure. Based on the above embodiments, the present disclosure embodiment additionally defines the step of moving target special effect materials. As shown in FIG3 , the method includes:
[0077] S310: Acquire original multimedia content and target parameters, wherein the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger a distortion operation, a scaling operation, and an attribute adjustment operation.
[0078] Exemplarily, original multimedia content and target parameters input in the interactive interface are obtained, wherein the target parameters include at least one of distortion center coordinates, visual range, distortion center attributes, brightness parameters, and overlay mode.
[0079] S320: Perform a distortion operation on the original multimedia content to obtain distorted content, perform a scaling operation on the distorted content to obtain special effect content, and perform an attribute adjustment operation on the special effect content to obtain attribute adjusted content, wherein the special effect content includes target special effect material.
[0080] S330: Superimpose the attribute adjustment content onto the original multimedia content according to the superposition mode to obtain target multimedia content.
[0081] S340 : In response to a movement operation on a target special effect material in the target multimedia content, determine a movement trajectory according to the distortion center coordinates corresponding to the target special effect material.
[0082] The movement operation may represent an interactive operation on a target object in the target multimedia content. For example, the movement operation may represent dragging the target special effects material along the boundary of the target object in the target multimedia content. Alternatively, the movement operation may represent moving the target special effects material in the target multimedia content along a set direction. Optionally, the movement operation on the target special effects material may be achieved by adjusting the distortion center coordinates. The movement trajectory may be determined based on the distortion center coordinates during the movement of the target special effects material. If the movement operation is dragging the target special effects material along the boundary of the target object in the target multimedia content, the movement trajectory represents the boundary of the target object.
[0083] Exemplarily, in response to a move operation on a target special effect material in the target multimedia content, coordinates of the distortion center after the move are acquired, and a movement trajectory is determined according to the coordinates of the distortion center.
[0084] S350: Control the target special effect material to move in the target multimedia content according to the movement trajectory.
[0085] For example, when the original multimedia content is distorted using the first distortion type, the distortion operation, scaling operation, and attribute adjustment operation are triggered based on the coordinates of each distortion center on the movement trajectory. When the original multimedia content is distorted using the second distortion type, the scaling operation and attribute adjustment operation are triggered based on the coordinates of each distortion center on the movement trajectory.
[0086] Then, the attribute adjustment content corresponding to the distortion center coordinates is overlaid onto the original multimedia content according to the overlay mode, resulting in the target multimedia content corresponding to the distortion center coordinates along the movement trajectory. The target multimedia content is then displayed in the interactive interface to create an effect of the target special effects material moving along the movement trajectory within the target multimedia content. For example, if the movement trajectory is the boundary of the target object, the target multimedia content will appear to have a light dot stroke effect.
[0087] The technical solution of the embodiment of the present disclosure, after adding target special effects material to the original multimedia content, determines the movement trajectory according to the movement operation on the target special effects material, and controls the movement of the target special effects material in the target multimedia content according to the movement trajectory, thereby enriching the display effect of the original multimedia content and improving the user interaction experience.
[0088] Figure 4 is a schematic diagram of the structure of a multimedia content processing device provided by 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, PC or server, etc.
[0089] As shown in FIG. 4 , the apparatus includes: a content acquisition module 410 , a content adjustment module 420 , and a content overlay module 430 .
[0090] A content acquisition module 410 is configured to acquire original multimedia content and target parameters, wherein the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger distortion operations, scaling operations, and attribute adjustment operations;
[0091] a content adjustment module 420 configured to perform a distortion operation on the original multimedia content to obtain distorted content, perform a scaling operation on the distorted content to obtain special effect content, and perform an attribute adjustment operation on the special effect content to obtain attribute-adjusted content, wherein the special effect content includes target special effect material;
[0092] The content overlay module 430 is configured to overlay the attribute adjustment content onto the original multimedia content according to the overlay mode to obtain target multimedia content.
[0093] Optionally, the content acquisition module 410 is specifically configured to:
[0094] Original multimedia content and target parameters input in the interactive interface are obtained, wherein the target parameters include at least one of distortion center coordinates, visual range, distortion center attributes, brightness parameters, and overlay mode.
[0095] Optionally, the device further comprises:
[0096] A moving module is used to respond to a moving operation on a target special effect material in the target multimedia content, determine a moving trajectory according to the distortion center coordinates corresponding to the target special effect material; and control the target special effect material to move in the target multimedia content according to the moving trajectory.
[0097] Optionally, the content adjustment module 420 includes:
[0098] a type determining unit, configured to determine a distortion type according to a shape parameter in the distortion center attribute, wherein the distortion type includes a first distortion type and a second distortion type;
[0099] a first distortion unit, configured to perform a distortion operation on the original multimedia content according to the distortion center coordinates for the first distortion type to obtain distorted content;
[0100] The second distortion unit is configured to perform a distortion operation on the original multimedia content according to the angle parameter in the distortion center attribute for the second distortion type to obtain distorted content.
[0101] Furthermore, the first distortion unit is specifically configured to:
[0102] For the first distortion type, determining a first distortion coefficient corresponding to a first pixel point according to coordinates of a first pixel point of the original multimedia content and coordinates of a distortion center;
[0103] The coordinates of the first pixel point are adjusted according to the distortion center coordinates and the first distortion coefficient to obtain distortion content.
[0104] Furthermore, the second distortion unit is specifically configured to:
[0105] For the second distortion type, determining the reference line and the segmentation line according to the angle parameter in the distortion center attribute;
[0106] Dividing the original multimedia content into content blocks according to the dividing line, and determining a first distance between a coordinate of a second pixel point of the content block and a reference line;
[0107] determining a second distortion coefficient corresponding to the second pixel point according to the first distance;
[0108] The coordinates of the second pixel point are adjusted according to the second distortion coefficient to obtain distorted content.
[0109] Optionally, the content adjustment module 420 further includes:
[0110] The special effect content generation unit is used to determine, for a third pixel point in the distorted content, a second distance between the coordinates of the third pixel point and the coordinates of the distortion center; and adjust the coordinates of the third pixel point according to the second distance and the visible range to obtain special effect content.
[0111] Optionally, the content adjustment module 420 further includes:
[0112] A brightness adjustment unit is used to determine a distance parameter for a fourth pixel point in the special effect content based on a third distance between the coordinates of the fourth pixel point and the coordinates of the distortion center and a visible range; determine a brightness coefficient corresponding to the fourth pixel point based on the distance parameter, the visible range and the brightness parameter; adjust the brightness of the fourth pixel point based on the brightness coefficient, and obtain attribute adjustment content.
[0113] The multimedia content processing device provided by the embodiments of the present disclosure can execute the multimedia content processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0114] 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.
[0115] FIG5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG5 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG5 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG5 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0116] As shown in FIG5 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0117] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0118] 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 includes a program code 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 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0119] 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.
[0120] The electronic device provided by the embodiment of the present disclosure and the method for processing multimedia content provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0121] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method for processing multimedia content provided in the above embodiment is implemented.
[0122] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0123] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can 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 later developed network.
[0124] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0125] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0126] Acquiring original multimedia content and target parameters, wherein the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger a distortion operation, a scaling operation, and an attribute adjustment operation;
[0127] performing a distortion operation on the original multimedia content to obtain distorted content, performing a scaling operation on the distorted content to obtain special effect content, and performing an attribute adjustment operation on the special effect content to obtain attribute-adjusted content, wherein the special effect content includes target special effect material;
[0128] The attribute adjustment content is superimposed on the original multimedia content according to the superposition mode to obtain the target multimedia content.
[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0131] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0132] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0134] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. 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 the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0135] 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 have been 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.
[0136] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for processing multimedia content, comprising: Obtaining original multimedia content and target parameters, wherein the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger distortion operations, scaling operations, and attribute adjustment operations; Performing a distortion operation on the original multimedia content to obtain distorted content, performing a scaling operation on the distorted content to obtain special effect content, and performing an attribute adjustment operation on the special effect content to obtain attribute-adjusted content, wherein the special effect content includes target special effect materials; Overlaying the attribute-adjusted content onto the original multimedia content according to the overlay mode to obtain target multimedia content.
2. The method according to claim 1, wherein The obtaining of the original multimedia content and the target parameters includes: Obtaining the original multimedia content and the target parameters input in an interactive interface, wherein the target parameters include at least one of distortion center coordinates, a visible range, distortion center attributes, a brightness parameter, and an overlay mode.
3. The method according to claim 2, wherein Further comprising: In response to a movement operation on a target special effect material in the target multimedia content, determining a movement trajectory according to the distortion center coordinates corresponding to the target special effect material; Controlling the movement of the target special effect material in the target multimedia content according to the movement trajectory.
4. The method according to claim 2, wherein The performing of the distortion operation on the original multimedia content to obtain distorted content includes: Determining a distortion type according to a shape parameter in the distortion center attributes, wherein the distortion type includes a first distortion type and a second distortion type; For the first distortion type, performing a distortion operation on the original multimedia content according to the distortion center coordinates to obtain distorted content; For the second distortion type, performing a distortion operation on the original multimedia content according to an angle parameter in the distortion center attributes to obtain distorted content.
5. The method according to claim 4, wherein, The for the first distortion type, performing a distortion operation on the original multimedia content according to the distortion center coordinates to obtain distorted content includes: For the first distortion type, determining a first distortion coefficient corresponding to a first pixel point according to the coordinates of the first pixel point of the original multimedia content and the distortion center coordinates; Adjusting the coordinates of the first pixel point according to the distortion center coordinates and the first distortion coefficient to obtain distorted content.
6. The method according to claim 4, wherein, The for the second distortion type, performing a distortion operation on the original multimedia content according to an angle parameter in the distortion center attributes to obtain distorted content includes: For the second distortion type, determining a reference line and a dividing line according to the angle parameter in the distortion center attributes; Dividing the original multimedia content into content blocks according to the dividing line, and determining a first distance between the coordinates of a second pixel point of the content block and the reference line; Determining a second distortion coefficient corresponding to the second pixel point according to the first distance; Adjusting the coordinates of the second pixel point according to the second distortion coefficient to obtain distorted content.
7. The method according to claim 2, wherein, The performing of the scaling operation on the distorted content to obtain special effect content includes: For a third pixel point in the distorted content, determining a second distance between the coordinates of the third pixel point and the distortion center coordinates; Adjusting the coordinates of the third pixel point according to the second distance and the visible range to obtain special effect content.
8. The method according to claim 2, wherein Performing an attribute adjustment operation on the special effect content to obtain attribute adjustment content includes: For the fourth pixel point in the special effect content, determining a distance parameter according to the third distance between the coordinates of the fourth pixel point and the distortion center coordinates and the visual range; Determining a brightness coefficient corresponding to the fourth pixel point according to the distance parameter, the visual range, and the brightness parameter, and adjusting the brightness of the fourth pixel point according to the brightness coefficient to obtain attribute adjustment content.
9. A processing device for multimedia content, wherein, Including: A content acquisition module, configured to acquire original multimedia content and target parameters, where the target parameters include content adjustment parameters and an overlay mode, and the content adjustment parameters are used to trigger a distortion operation, a scaling operation, and an attribute adjustment operation; A content adjustment module, configured to perform a distortion operation on the original multimedia content to obtain distorted content, perform a scaling operation on the distorted content to obtain special effect content, and perform an attribute adjustment operation on the special effect content to obtain attribute adjustment content, where the special effect content includes target special effect materials; A content overlay module, configured to overlay the attribute adjustment content on the original multimedia content according to the overlay mode to obtain target multimedia content.
10. An electronic device, including: One or more processors; A storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, enabling the one or more processors to implement the multimedia content processing method according to any one of claims 1-8.
11. A storage medium containing computer-executable instructions, wherein, The computer-executable instructions, when executed by a computer processor, are used to execute the multimedia content processing method according to any one of claims 1-8.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and storage medium
CN114092678A
Video processing method and system, electronic equipment and medium
CN114630181A
Image processing method and device, equipment and medium
CN115937010A
Special effect video determination method and device, electronic equipment and storage medium
CN116847147A