Media content processing method and device, equipment, readable storage medium and product
By adjusting the pixel distribution of media content based on the normal information of the noise graph and using a virtual light source to simulate the effect of the frozen surface, the problem of poor media content processing in the prior art is solved, and more efficient and real media content processing is achieved.
Patent Information
- Application Number
- CN202311499348.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2043-11-10
AI Technical Summary
The existing media content processing methods are not effective and cannot meet the actual needs of users.
By obtaining preset media content and noise map, adjusting the pixel distribution in the media content based on the normal information of the noise map, and performing refinement operations through a virtual light source to simulate the refraction effect and highlights and shadows of the frozen surface.
It realizes efficient processing of media content, simulates the translucent reality similar to the frozen surface, and improves the processing effect of media content.
Smart Images

Figure CN119996590A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular, to a media content processing method, apparatus, device, readable storage medium, and product. Background Art
[0002] Currently, more and more video software and social software have entered the lives of users. Users can publish media content in video software and social software to achieve content sharing and interaction.
[0003] Before publishing media content, users generally need to edit the media content to improve the quality of the published media content. However, current media content editing methods can generally only edit the tone, transition, length and other contents of the media content, which often have poor processing effects and cannot meet the actual needs of users. Summary of the invention
[0004] The embodiments of the present disclosure provide a media content processing method, apparatus, device, readable storage medium and product, which are used to solve the technical problem that the existing media content processing methods have poor effects.
[0005] In a first aspect, an embodiment of the present disclosure provides a media content processing method, including:
[0006] Obtaining a media content processing request, and obtaining preset media content to be processed and a noise map according to the media content processing request;
[0007] Determine normal information corresponding to pixels in the noise map;
[0008] Adjusting pixel distribution of the image frame in the preset media content based on the normal information to obtain adjusted media content;
[0009] The adjusted media content is re-illuminated by using a preset virtual light source to obtain target media content.
[0010] In a second aspect, an embodiment of the present disclosure provides a media content processing device, including:
[0011] An acquisition module, used to acquire a media content processing request, and acquire preset media content to be processed and a noise map according to the media content processing request;
[0012] A determination module, used to determine normal information corresponding to pixels in the noise map;
[0013] An adjustment module, configured to adjust pixel distribution of an image frame in the preset media content based on the normal information to obtain adjusted media content;
[0014] The lighting module is used to perform a re-lighting operation on the adjusted media content through a preset virtual light source to obtain target media content.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the media content processing method as described in the first aspect and various possible designs of the first aspect.
[0018] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the media content processing method described in the first aspect and various possible designs of the first aspect is implemented.
[0019] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the media content processing method as described in the first aspect and various possible designs of the first aspect.
[0020] The media content processing method, device, equipment, readable storage medium and product provided in this embodiment adjust the pixel distribution of the image frame in the preset media content based on the normal information of the noise map after obtaining the preset media content and the noise map, so that the adjusted media content can simulate the refraction effect similar to the ice surface. Furthermore, a virtual light source can be set in advance, and the adjusted media content can be re-lit by the virtual light source, so that the highlights and shadows of the ice surface can be highlighted, the light transmittance of the ice can be increased, and the processing effect of the media content can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 A flowchart of a media content processing method provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a noise diagram provided by an embodiment of the present disclosure;
[0024] Figure 3 A flowchart of a media content processing method provided by another embodiment of the present disclosure;
[0025] Figure 4 A schematic diagram of diffuse reflection provided for an embodiment of the present disclosure;
[0026] Figure 5 A schematic diagram of mirror reflection provided in an embodiment of the present disclosure;
[0027] Figure 6 A flowchart of a media content processing method provided by another embodiment of the present disclosure;
[0028] Figure 7 A flowchart of a media content processing method provided by another embodiment of the present disclosure;
[0029] Figure 8 A flowchart of a media content processing method provided by another embodiment of the present disclosure;
[0030] Fig. 9 A schematic diagram of the structure of a media content processing device provided in an embodiment of the present disclosure;
[0031] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0033] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0034] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0035] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0036] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0037] In order to solve the technical problem that the existing media content processing methods have poor effects, the present disclosure provides a media content processing method, device, equipment, readable storage medium and product.
[0038] It should be noted that the media content processing method, device, equipment, readable storage medium and product provided by the present disclosure can be applied in any application scenario for processing media content, wherein the media content includes but is not limited to video content, picture content and the like.
[0039] Current media content processing methods generally process the tone, duration, transition, etc. of the media content. However, when the above methods are used to process the media content, the media content processing effect often cannot meet the actual needs of users.
[0040] In the process of solving the above technical problems, the inventors discovered through research that in order to improve the processing effect of media content, the icing effect on the surface of the media content can be simulated.
[0041] Optionally, in order to achieve the icing effect, preset media content and a noise map may be obtained, and the pixel distribution of the image frame in the preset media content may be adjusted based on the normal information of the noise map, so that the adjusted media content can simulate a refraction effect similar to that of an icy surface. Furthermore, a virtual light source may be pre-set, and the adjusted media content may be re-lit by the virtual light source, so that the highlights and shadows of the icing surface can be highlighted, the light transmittance of the icing can be increased, and the processing effect of the media content can be improved.
[0042] Furthermore, the normal information can be adjusted according to the timing information of the image frame, and the pixel distribution of the image frame can be adjusted based on the adjusted normal information, so as to simulate the display effect of ice cubes gradually melting, and further improve the content quality of the target media content.
[0043] Figure 1 A flow chart of a media content processing method provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the method includes:
[0044] Step 101: Obtain a media content processing request, and obtain preset media content to be processed and a noise map according to the media content processing request.
[0045] The execution subject of this embodiment is a media content processing device, which can be coupled to a server. The server can be connected to the terminal device and the data server in communication. Therefore, based on the media content processing request sent by the terminal device, the preset media content and the noise map can be obtained from the data server, and the preset media content can be processed based on the noise map to present the effect of ice refraction on the preset media content.
[0046] Alternatively, the media content processing device can be coupled to a terminal device, so that it can obtain a preset and a noise map in response to a media content processing request triggered by a user, and process the preset media content based on the noise map to present an effect of ice refraction on the preset media content.
[0047] In this embodiment, in order to implement the media content processing operation, the user can trigger the media content processing request according to actual needs. After obtaining the media content processing request, the media content processing device can first obtain the preset media content to be processed and the noise map, so that the preset media content can be processed based on the noise map to present the display effect of ice surface refraction on the preset media content. Among them, the preset media content can be uploaded by the user according to actual needs, or can be collected in real time, and the present disclosure does not limit this.
[0048] It should be noted that the media content may be image media content or video media content, and the present disclosure does not impose any limitation on this.
[0049] Figure 2 A noise diagram schematic diagram provided by an embodiment of the present disclosure, such as Figure 2 As shown, the noise map 21 can be formed by combining a plurality of preset noises with different distributions using a fractal Brownian motion function. The noise map 21 can simulate the visual effect of ice formation, thereby adjusting the pixel distribution of the image frame in the preset media content based on the normal information of the noise map 21, and simulating the visual effect of ice formation on the surface of the preset media content.
[0050] Step 102: Determine normal information corresponding to pixels in the noise map.
[0051] In this embodiment, after the noise map is obtained, the image frame in the preset media content can be controlled to simulate the offset and distortion degree in the noise map to present the effect of ice surface refraction. In order to adjust the pixel distribution of the image frame, it is first necessary to determine the normal information corresponding to each pixel in the noise map.
[0052] Step 103: Adjust the pixel distribution of the image frame in the preset media content based on the normal information to obtain adjusted media content.
[0053] In this embodiment, after obtaining the normal information corresponding to the pixels in the noise map, the pixel distribution of the image frame in the preset media content can be adjusted based on the normal information so that the image frame can simulate the offset and distortion in the noise map, present the effect of ice surface refraction, and obtain adjusted media content.
[0054] Step 104: relighting the adjusted media content using a preset virtual light source to obtain target media content.
[0055] In this embodiment, in order to increase the light transmittance realism of the ice surface, a virtual light source can be pre-set, and the adjusted media content can be re-lit by the virtual light source to obtain the target media content. During the re-lighting process, the virtual light source can simulate the diffuse reflection and mirror reflection effects of the light source to the ice surface, further highlighting the highlights and shadows on the material, and can obtain a more delicate highlight effect on the reflective surface, thereby enhancing the sense of reality.
[0056] As an practicable manner, after obtaining the adjusted media content or the target media content, a preset color distribution may be superimposed on the adjusted media content or the target media content, thereby simulating the display effect of the color of the preset media content passing through the ice surface. The color distribution may be preset by the user or generated based on the image frame corresponding to the preset media content, and the present disclosure does not limit this.
[0057] The media content processing method provided in this embodiment adjusts the pixel distribution of the image frame in the preset media content based on the normal information of the noise map after obtaining the preset media content and the noise map, so that the adjusted media content can simulate the refraction effect similar to the ice surface. Furthermore, a virtual light source can be set in advance, and the adjusted media content can be re-lit by the virtual light source, so that the highlights and shadows of the ice surface can be highlighted, the light transmittance reality of the ice can be increased, and the processing effect of the media content can be improved.
[0058] Figure 3 A flow chart of a media content processing method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 3 As shown, step 104 includes:
[0059] Step 301: Determine the reflection effect corresponding to the virtual light source through a preset lighting model.
[0060] Step 302: superimpose the reflection effect on the adjusted media content to obtain target media content.
[0061] In this embodiment, after setting the virtual light source, in order to simulate the real light transmittance of the virtual light source shining on the ice surface, the reflection effect corresponding to the virtual light source can be determined by a preset illumination model. The reflection effect is superimposed on the adjusted media content to obtain the target media content.
[0062] When the media content is video media content, the reflection effect can be superimposed on each image frame corresponding to the video media content. When the media content is image media content, the reflection effect can be superimposed directly on the image media content.
[0063] Optionally, the reflection effect may be composed of diffuse reflection intensity and specular reflection intensity. The diffuse reflection intensity can simulate a real light transmittance, while the specular reflection intensity can emphasize a real highlight effect.
[0064] The media content processing method provided in this embodiment determines the reflection effect corresponding to the virtual light source based on the illumination model, and superimposes the reflection effect on the adjusted media content to obtain the target media content, thereby increasing the light transmittance reality of the ice surface and improving the authenticity of media content processing.
[0065] Further, based on any of the above embodiments, step 301 includes:
[0066] Determine the position information corresponding to the virtual light source.
[0067] The lighting direction is determined based on the position information corresponding to the virtual light source.
[0068] The diffuse reflection intensity and the specular reflection intensity generated by the virtual light source during the relighting operation are determined according to the lighting direction and the normal information.
[0069] A reflection result is determined based on the diffuse reflection intensity and the specular reflection intensity.
[0070] In this embodiment, in order to determine the reflection result corresponding to the virtual light source, the position information corresponding to the virtual light source can be determined first. The position information of the virtual light source can be set by the user according to actual needs, or can be preset, and the present disclosure does not limit this.
[0071] Furthermore, after the position information of the virtual light source is determined, the lighting direction of the virtual light source toward the ice surface can be determined based on the position information, so that the effect of the virtual light source illuminating the ice surface can be accurately simulated based on the lighting direction.
[0072] Optionally, the diffuse reflection intensity and the specular reflection intensity generated by the virtual light source during the relighting operation can be determined according to the illumination direction and the normal information, respectively. The diffuse reflection intensity and the specular reflection intensity can be calculated by the dot product of the normal direction and the illumination direction, and then the reflection result can be determined based on the diffuse reflection intensity and the specular reflection intensity.
[0073] Figure 4 A schematic diagram of diffuse reflection provided by an embodiment of the present disclosure, such as Figure 4 As shown, the diffuse reflection schematic diagram 41 can simulate the actual reflection light sensation when the ice surface is illuminated by a virtual light source.
[0074] Figure 5 A schematic diagram of mirror reflection provided by an embodiment of the present disclosure, such as Figure 5 As shown, the mirror reflection schematic diagram 51 can simulate the highlight effect when the virtual light source illuminates the ice surface, thereby enhancing the realism of the target media content.
[0075] By determining the reflection result based on the diffuse reflection intensity and the specular reflection intensity, and overlaying the reflection result on the adjusted media content, the light-transmitting realism of the ice can be increased, which can highlight the highlights and shadows on the material.
[0076] The media content processing method provided in this embodiment simulates the diffuse reflection and mirror reflection effects of the light source to the ice surface through a lighting model, thereby highlighting the highlights and shadows on the material and obtaining a more delicate highlight effect on the reflective surface, thereby enhancing the sense of reality.
[0077] Further, based on any of the above embodiments, determining the illumination direction based on the position information corresponding to the virtual light source includes:
[0078] A difference between the position information and the normal information corresponding to the image frame is calculated, and the illumination direction is determined based on the difference.
[0079] In this embodiment, the illumination direction of the virtual light source can be determined by calculating the difference between the position information and the normal information corresponding to the image frame. For example, the position information of the virtual light source is (X', Y', Z'), and the normal information corresponding to the image frame is (X, Y, Z). The illumination direction of the virtual light source can be determined by calculating the difference between (X', Y', Z') and (X, Y, Z).
[0080] The media content processing method provided in this embodiment can accurately determine the position information of the virtual light source by calculating the difference between the position information and the normal information corresponding to the image frame, and further can accurately determine the reflection effect of the virtual light source based on the position information of the virtual light source.
[0081] Further, based on any of the above embodiments, determining the reflection result based on the diffuse reflection intensity and the specular reflection intensity includes:
[0082] A weighted operation is performed on the diffuse reflection intensity and the specular reflection intensity to obtain a reflection result.
[0083] In this embodiment, after respectively determining the diffuse reflection intensity and the specular reflection intensity, a weighted operation may be performed on the diffuse reflection intensity and the specular reflection intensity to obtain a reflection result. The weight values corresponding to the diffuse reflection intensity and the specular reflection intensity may be the same. Alternatively, the user may also adjust the weights of the diffuse reflection intensity and the specular reflection intensity according to actual needs to present different lighting effects.
[0084] The media content processing method provided in this embodiment can accurately determine the reflection result by performing weighted operations on the diffuse reflection intensity and the mirror reflection intensity. The reflection result can reflect the diffuse reflection intensity and the mirror reflection intensity at the same time, thereby improving the authenticity of media content processing.
[0085] Figure 6 A flow chart of a media content processing method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 6 As shown, step 102 includes:
[0086] Step 601: Adjust the noise image to a grayscale image.
[0087] Step 602: Derivative the adjacent pixels in the first coordinate axis and the second coordinate axis of the pixels in the grayscale image, fix the third coordinate axis direction of the pixels in the grayscale image to a preset direction, and obtain the normal information.
[0088] In this embodiment, after the noise map is acquired, the image frames in the preset media content may be controlled to simulate the offset and distortion degree in the noise map to present the effect of an icy surface.
[0089] In order to adjust the pixel distribution of the image frame, it is first necessary to determine the normal information of the noise map.
[0090] Optionally, the noise image may be adjusted to a grayscale image. The pixels in the grayscale image are derivatized with respect to adjacent pixels in the first coordinate axis and the second coordinate axis, and the third coordinate axis direction of the pixels in the grayscale image is fixed to a preset direction to obtain normal information.
[0091] The first coordinate axis may be a lower X axis, the second coordinate axis may be a Y axis, and the third coordinate axis may be a Z axis. The preset direction may be a vertical outward direction.
[0092] The media content processing method provided in this embodiment converts the noise image into a grayscale image, and then derives the pixel values of the grayscale image in the x-axis and y-axis directions of adjacent pixels to obtain a gradient image to simulate the xy-axis direction of its normal, wherein the z-axis direction is fixed to be vertically outward, thereby being able to accurately determine the normal information of each pixel point.
[0093] Figure 7 A flow chart of a media content processing method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 7 As shown, step 103 includes:
[0094] Step 701: Determine offset information based on the normal information and a preset offset algorithm.
[0095] Step 702: Perform an offset process on pixels in the image frame corresponding to the preset media content according to the offset information to obtain adjusted media content.
[0096] In this embodiment, after determining the normal information corresponding to the noise map, the offset information can be determined based on the normal information corresponding to the noise map, and the pixel distribution in the image frame can be adjusted based on the offset information so that the image frame can simulate the offset and distortion in the noise map to present the effect of surface ice refraction.
[0097] Optionally, the offset information may be determined based on the normal information and a preset offset algorithm, wherein the offset algorithm may be an algorithm preset in Open GV, or may be any other algorithm capable of calculating the offset based on the normal information, which is not limited in the present disclosure.
[0098] Optionally, the difference between the normal information and the preset parameter can be multiplied by the offset degree parameter to obtain a preliminary result. After the normal information is subtracted from the preset parameter, the value range of the preliminary result may be different from the value range of the normal information. Therefore, the value range of the preliminary result can also be readjusted to the original value range to obtain the offset information. For example, the value range of the normal information can be (-1,1).
[0099] It should be noted that the user can adjust the offset degree parameter according to actual needs, and by adjusting the offset degree parameter, the offset information can be adjusted. The larger the offset information, the more obvious the refraction effect.
[0100] Furthermore, the pixels in the image frame corresponding to the preset media content may be offset according to the offset information to obtain adjusted media content.
[0101] Optionally, the sum of the pixel coordinates in the image frame and the preset parameters may be divided by 2 to obtain a preliminary result, and the preliminary result may be multiplied by the offset information to implement offset processing of the pixels in the image frame corresponding to the preset media content to obtain adjusted media content.
[0102] The media content processing method provided in this embodiment determines offset information based on normal information, and performs offset processing on pixels in an image frame corresponding to preset media content based on the offset information, so that the adjusted media content can simulate a refraction effect similar to ice, and adjust the material of the preset media content to improve the display effect of the target media content.
[0103] Figure 8 A flow chart of a media content processing method provided by another embodiment of the present disclosure is provided. Based on any of the above embodiments, Figure 8 As shown, after step 102, the following steps are also included:
[0104] Step 801: Determine timing information corresponding to image frames in preset media content.
[0105] Step 802: adjusting the normal information according to the timing information and a preset normal adjustment algorithm, so that the normal information is gradually adjusted to a preset normal according to the timing information.
[0106] In this embodiment, in order to enrich the display effect of the target media content, after adjusting the pixel distribution of the image frame based on the normal information of the noise map to simulate the display effect of ice, the texture of the ice surface can be gradually adjusted. For example, the effect of the ice surface gradually disappearing can be simulated.
[0107] In order to achieve gradual adjustment of the ice surface texture, the timing information corresponding to the image frame in the preset media content can be determined, wherein the timing information can be the timestamp of the image frame in the preset media content.
[0108] Furthermore, the normal information can be adjusted based on the timing information and the preset normal adjustment algorithm, so that the normal information is gradually adjusted to the preset normal according to the timing information. The normal information can be (x, y, z), and the preset normal can be (0, 0, 1). By adjusting the normal information from (x, y, z) to (0, 0, 1), the effect of the ice surface texture gradually disappearing can be simulated. Alternatively, the preset normal can be a value set by the user according to actual needs to present different gradient effects, and the present disclosure does not limit this.
[0109] Optionally, the normal adjustment algorithm may be (1-t)*vec3(x, y, z)+t*vec3(0, 0, 1), through which the normal adjustment algorithm may linearly adjust the normal information from (x, y, z) to (0, 0, 1) to achieve a gradient effect. Alternatively, the gradient adjustment of the glass texture may be achieved by other gradient algorithms, which is not limited in the present disclosure.
[0110] The media content processing method provided in this embodiment adjusts the normal information according to the timing information and the preset normal adjustment algorithm, and gradually adjusts the normal information to the preset normal according to the timing information, thereby simulating the effect of the ice surface texture gradually disappearing, enriching the display effect of media content processing, and improving the content quality of the target media content.
[0111] Further, based on any of the above embodiments, step 103 includes:
[0112] For each image frame in the preset media content, target normal information corresponding to the image frame is determined according to timing information corresponding to the image frame.
[0113] The pixel distribution of the image frame in the preset media content is adjusted based on the target normal information to obtain an adjusted image frame.
[0114] The adjusted media content is obtained according to the adjusted image frame.
[0115] In this embodiment, in order to enable the preset media content to present the effect of gradual change of ice surface texture, for each image frame, the timing information corresponding to the image frame can be determined. The target normal information corresponding to the image frame is determined based on the timing information. Since the timing information corresponding to each image frame is different, the target normal information corresponding to different image frames is also different. As the timing information gradually increases, the effect of gradual change of ice surface texture can be presented in different image frames.
[0116] Optionally, after determining the target normal information corresponding to the image frame, the pixel distribution of the image frame in the preset media content can be adjusted based on the target normal information to obtain the adjusted media content. Since the timing information corresponding to each image frame is different, the image frames adjusted based on the target normal information corresponding to different image frames can also present different ice surface refraction effects.
[0117] Furthermore, after the image frames are adjusted based on the target normal information corresponding to each image frame, the target media content may be constructed based on the adjusted plurality of image frames.
[0118] The media content processing method provided in this embodiment determines the corresponding target normal information for each image frame, thereby being able to present different ice surface refraction effects in each image frame and accurately simulate the effect of the ice surface texture gradually disappearing.
[0119] Fig. 9 A structural diagram of a media content processing device provided by an embodiment of the present disclosure, such as Fig. 9 As shown, the device includes: an acquisition module 91, a determination module 92, an adjustment module 93 and a lighting module 94. Among them, the acquisition module 91 is used to obtain a media content processing request, and obtain the preset media content and noise map to be processed according to the media content processing request. The determination module 92 is used to determine the normal information corresponding to the pixels in the noise map. The adjustment module 93 is used to adjust the pixel distribution of the image frame in the preset media content based on the normal information to obtain the adjusted media content. The lighting module 94 is used to re-light the adjusted media content through a preset virtual light source to obtain the target media content.
[0120] Further, based on any of the above embodiments, the lighting module is used to: determine the reflection effect corresponding to the virtual light source through a preset lighting model, and superimpose the reflection effect on the adjusted media content to obtain the target media content.
[0121] Further, based on any of the above embodiments, the lighting module is used to: determine the position information corresponding to the virtual light source. Determine the lighting direction based on the position information corresponding to the virtual light source. Determine the diffuse reflection intensity and the mirror reflection intensity generated by the virtual light source during the relighting operation according to the lighting direction and the normal information. Determine the reflection result based on the diffuse reflection intensity and the mirror reflection intensity.
[0122] Further, based on any of the above embodiments, the lighting module is used to: calculate the difference between the position information and the normal information corresponding to the image frame, and determine the lighting direction based on the difference.
[0123] Further, based on any of the above embodiments, the lighting module is used to: perform a weighted operation on the diffuse reflection intensity and the specular reflection intensity to obtain a reflection result.
[0124] Further, based on any of the above embodiments, the determination module is used to: adjust the noise image to a grayscale image, perform derivatives of adjacent pixels in the first coordinate axis and the second coordinate axis for pixels in the grayscale image, fix the third coordinate axis direction of the pixels in the grayscale image to a preset direction, and obtain the normal information.
[0125] Further, based on any of the above embodiments, the adjustment module is used to: determine the offset information based on the normal information and a preset offset algorithm, and perform offset processing on pixels in the image frame corresponding to the preset media content according to the offset information to obtain adjusted media content.
[0126] Further, based on any of the above embodiments, the device further includes: a determination module, for determining the timing information corresponding to the image frame in the preset media content; an adjustment module, for adjusting the normal information according to the timing information and a preset normal adjustment algorithm, so that the normal information is gradually adjusted to a preset normal according to the timing information.
[0127] Further, based on any of the above embodiments, the adjustment module is used to: for each image frame in the preset media content, determine the target normal information corresponding to the image frame according to the timing information corresponding to the image frame. Adjust the pixel distribution of the image frame in the preset media content based on the target normal information to obtain an adjusted image frame. Obtain the adjusted media content according to the adjusted image frame.
[0128] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0129] In order to implement the above embodiment, the present disclosure also provides an electronic device, including: a processor and a memory;
[0130] The memory stores computer-executable instructions;
[0131] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the media content processing method as described in any of the above embodiments.
[0132] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the media content processing method described in any of the above embodiments is implemented.
[0133] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program, and when the computer program is executed by a processor, the media content processing method as described in any of the above embodiments is implemented.
[0134] Fig.10The electronic device 1000 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, and the electronic device 1000 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (Portable Media Players, PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0135] like Fig.10 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 to a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0136] Typically, the following devices may be connected to the I / O interface 1005: input devices 1006 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1008 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.10 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0137] 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 computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1009, or installed from a storage device 1008, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0138] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0139] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0140] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0141] 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 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 an independent 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 via 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., via the Internet using an Internet service provider).
[0142] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0143] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0144] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0145] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0146] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0147] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0148] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A media content processing method, characterized in that: include: Obtaining a media content processing request, and obtaining preset media content to be processed and a noise map according to the media content processing request; Determine normal information corresponding to pixels in the noise map; Adjusting pixel distribution of the image frame in the preset media content based on the normal information to obtain adjusted media content; The adjusted media content is re-illuminated by using a preset virtual light source to obtain target media content.
2. The method according to claim 1, characterized in that The relighting operation is performed on the adjusted media content by using a preset virtual light source to obtain target media content, including: Determine the reflection effect corresponding to the virtual light source through a preset illumination model; The reflection effect is superimposed on the adjusted media content to obtain target media content.
3. The method according to claim 2, characterized in that The determining the reflection effect corresponding to the virtual light source by using a preset illumination model includes: Determining position information corresponding to the virtual light source; Determining a lighting direction based on position information corresponding to the virtual light source; Determine, according to the illumination direction and the normal information, respectively, the diffuse reflection intensity and the specular reflection intensity generated by the virtual light source during the relighting operation; A reflection result is determined based on the diffuse reflection intensity and the specular reflection intensity.
4. The method according to claim 3, characterized in that The determining the illumination direction based on the position information corresponding to the virtual light source includes: A difference between the position information and the normal information corresponding to the image frame is calculated, and the illumination direction is determined based on the difference.
5. The method according to claim 3, characterized in that: The determining of the reflection result based on the diffuse reflection intensity and the specular reflection intensity comprises: A weighted operation is performed on the diffuse reflection intensity and the specular reflection intensity to obtain a reflection result.
6. The method according to any one of claims 1 to 5, characterized in that: The determining the normal information corresponding to the pixel in the noise map comprises: Adjusting the noise image to a grayscale image; Derivatives are performed on adjacent pixels in the first coordinate axis and the second coordinate axis for the pixels in the grayscale image, and the third coordinate axis direction of the pixels in the grayscale image is fixed to a preset direction to obtain the normal information.
7. The method according to any one of claims 1 to 5, characterized in that: The step of adjusting pixel distribution of an image frame in the preset media content based on the normal information to obtain adjusted media content includes: Determining offset information based on the normal information and a preset offset algorithm; An offset process is performed on pixels in an image frame corresponding to the preset media content according to the offset information to obtain adjusted media content.
8. The method according to any one of claims 1 to 5, characterized in that: After determining the normal information corresponding to the pixel in the noise map, the method further includes: For image frames in preset media content, determining timing information corresponding to the image frames; The normal information is adjusted according to the timing information and a preset normal adjustment algorithm, so that the normal information is gradually adjusted to a preset normal according to the timing information.
9. The method according to claim 8, characterized in that The step of adjusting pixel distribution of an image frame in the preset media content based on the normal information to obtain adjusted media content includes: For each image frame in the preset media content, determining target normal information corresponding to the image frame according to timing information corresponding to the image frame; Adjusting pixel distribution of an image frame in the preset media content based on the target normal information to obtain an adjusted image frame; The adjusted media content is obtained according to the adjusted image frame.
10. A media content processing device, characterized in that: include: An acquisition module, used to acquire a media content processing request, and acquire preset media content to be processed and a noise map according to the media content processing request; A determination module, used to determine normal information corresponding to pixels in the noise map; An adjustment module, configured to adjust pixel distribution of an image frame in the preset media content based on the normal information to obtain adjusted media content; The lighting module is used to perform a re-lighting operation on the adjusted media content through a preset virtual light source to obtain target media content.
11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the media content processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the media content processing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and storage medium
CN114331823A
Rendering method and device of freezing effect model and electronic equipment
CN114998502A
Water wave simulation method and device, electronic equipment and storage medium
CN116194961A
Image signal processing apparatus and method for correcting defective pixel
JP2003069901A
Image processing method and apparatus, electronic device, and storage medium
WO2022142875A1