WO2025098511A1 - 媒体内容处理方法、装置、设备、可读存储介质及产品 - Google Patents

媒体内容处理方法、装置、设备、可读存储介质及产品 Download PDF

Info

Publication number
WO2025098511A1
WO2025098511A1 PCT/CN2024/131276 CN2024131276W WO2025098511A1 WO 2025098511 A1 WO2025098511 A1 WO 2025098511A1 CN 2024131276 W CN2024131276 W CN 2024131276W WO 2025098511 A1 WO2025098511 A1 WO 2025098511A1
Authority
WO
WIPO (PCT)
Prior art keywords
media content
preset
adjusted
image frame
normal information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/131276
Other languages
English (en)
French (fr)
Inventor
陈璐双
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Publication of WO2025098511A1 publication Critical patent/WO2025098511A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof

Definitions

  • the embodiments of the present disclosure relate to a media content processing method, apparatus, device, readable storage medium and product.
  • the present disclosure provides a method for processing media content, including:
  • the adjusted media content is re-illuminated by using a preset virtual light source to obtain target media content.
  • the present disclosure provides a media content processing device, including:
  • 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.
  • An embodiment of the present disclosure provides an electronic device, including: a processor and a memory;
  • the memory stores computer-executable instructions
  • the processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the media content processing method as described above.
  • An embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored.
  • a processor executes the computer-executable instructions, the media content processing method described above is implemented.
  • An embodiment of the present disclosure provides 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 above is implemented.
  • FIG1 is a schematic diagram of a flow chart of a media content processing method provided by an embodiment of the present disclosure
  • FIG2 is a schematic diagram of a noise diagram provided by an embodiment of the present disclosure.
  • FIG3 is a schematic diagram of a flow chart of a media content processing method provided by yet another embodiment of the present disclosure.
  • FIG4 is a schematic diagram of diffuse reflection provided by an embodiment of the present disclosure.
  • FIG5 is a schematic diagram of mirror reflection provided by an embodiment of the present disclosure.
  • FIG6 is a schematic diagram of a flow chart of a media content processing method provided by yet another embodiment of the present disclosure.
  • FIG7 is a schematic diagram of a flow chart of a media content processing method provided by yet another embodiment of the present disclosure.
  • FIG8 is a schematic diagram of a flow chart of a media content processing method provided by yet another embodiment of the present disclosure.
  • FIG9 is a schematic diagram of the structure of a media content processing device provided by an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.
  • a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require the acquisition and use of the user's personal information.
  • the prompt information in response to receiving an active request from the user, 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.
  • the pop-up window may also carry a selection control for the user to choose "agree” or “disagree” to provide personal information to the electronic device.
  • the present disclosure provides a media content processing method, device, equipment, readable storage medium and product.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • FIG. 1 is a flow chart of a media content processing method provided by an embodiment of the present disclosure. As shown in FIG. 1 , the method includes:
  • 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.
  • 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.
  • the media content processing device may be coupled to a terminal device so as to be able to respond to media content triggered by a user.
  • the request is processed to obtain a preset and a noise map, and the preset media content is processed based on the noise map to present an effect of ice refraction on the preset media content.
  • the user in order to implement the media content processing operation, can trigger the media content processing request according to actual needs.
  • 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.
  • 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.
  • the media content may be image media content or video media content, and the present disclosure does not impose any limitation on this.
  • FIG2 is a schematic diagram of a noise map provided by an embodiment of the present disclosure.
  • a 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 an image frame in a 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.
  • Step 102 Determine normal information corresponding to pixels in the noise map.
  • 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.
  • 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.
  • 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.
  • Step 104 relighting the adjusted media content using a preset virtual light source to obtain target media content.
  • a virtual light source in order to increase the light transmittance realism of the ice surface, can be pre-set, and the adjusted media content can be re-lit by the virtual light source to obtain the target media content.
  • 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.
  • 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.
  • the media content processing method provided in this embodiment is to obtain preset media content and noise map based on The normal information of the noise map adjusts the pixel distribution of the image frame in the preset media content, so that the adjusted media content can simulate the refraction effect similar to the ice surface.
  • 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.
  • FIG3 is a flow chart of a media content processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG3 , step 104 includes:
  • Step 301 Determine the reflection effect corresponding to the virtual light source through a preset illumination model.
  • Step 302 superimpose the reflection effect on the adjusted media content to obtain target media content.
  • 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.
  • the reflection effect can be superimposed on each image frame corresponding to the video media content.
  • the reflection effect can be superimposed directly on the image media content.
  • 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.
  • 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.
  • step 301 includes:
  • the lighting direction is determined based on the position information corresponding to the virtual light source.
  • 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.
  • a reflection result is determined based on the diffuse reflection intensity and the specular reflection intensity.
  • 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.
  • 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.
  • 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.
  • FIG4 is a diffuse reflection schematic diagram provided by an embodiment of the present disclosure. As shown in FIG4 , the diffuse reflection schematic diagram 41 can simulate the actual reflected light sensation when the ice surface is illuminated by a virtual light source.
  • FIG5 is a schematic diagram of mirror reflection provided by an embodiment of the present disclosure.
  • the mirror reflection schematic diagram 51 can simulate the highlight effect when a virtual light source illuminates an ice surface, thereby enhancing the realism of target media content.
  • the light-transmitting realism of the ice can be increased, which can highlight the highlights and shadows on the material.
  • 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.
  • 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.
  • 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.
  • the position information of the virtual light source is (X', Y', Z')
  • 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).
  • 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.
  • determining the reflection result based on the diffuse reflection intensity and the specular reflection intensity includes:
  • a weighted operation is performed on the diffuse reflection intensity and the specular reflection intensity to obtain a reflection result.
  • 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.
  • 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.
  • 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.
  • FIG6 is a flow chart of a media content processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG6 , step 102 includes:
  • Step 601 Adjust the noise image to a grayscale image.
  • Step 602 Derivative the adjacent pixels in the first coordinate axis and the second coordinate axis for the pixels in the grayscale image.
  • the direction of the third coordinate axis of the pixel in the grayscale image is fixed to a preset direction to obtain the normal information.
  • 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.
  • 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.
  • the first coordinate axis may be a lower X axis
  • the second coordinate axis may be a Y axis
  • the third coordinate axis may be a Z axis.
  • the preset direction may be a vertical outward direction.
  • 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.
  • FIG. 7 is a flow chart of a media content processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG. 7 , step 103 includes:
  • Step 701 Determine offset information based on the normal information and a preset offset algorithm.
  • 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.
  • 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.
  • the offset information may be determined based on the normal information and a preset offset algorithm.
  • the offset algorithm may be an algorithm preset in Open GV, or may be any other algorithm that can calculate the offset based on the normal information, and the present disclosure does not limit this.
  • the difference between the normal information and the preset parameter can be multiplied by the offset degree parameter to obtain a preliminary result.
  • 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.
  • the value range of the normal information can be (-1,1).
  • 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.
  • 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.
  • the sum of the pixel coordinates in the image frame and the preset parameter can be divided by 2 to obtain a preliminary result, and the preliminary result can be multiplied by the offset information to implement the offset processing of the pixels in the image frame corresponding to the preset media content to obtain the adjusted media content.
  • 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.
  • FIG8 is a flow chart of a media content processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG8 , after step 102, the method further includes:
  • Step 801 Determine timing information corresponding to image frames in preset media content.
  • 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.
  • the texture of the ice surface can be gradually adjusted.
  • the effect of the ice surface gradually disappearing can be simulated.
  • 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.
  • 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).
  • 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.
  • 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.
  • the gradient adjustment of the glass texture may be achieved by other gradient algorithms, which is not limited in the present disclosure.
  • 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.
  • step 103 includes:
  • target normal information corresponding to the image frame is determined according to timing information corresponding to the image frame.
  • 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.
  • the adjusted media content is obtained according to the adjusted image frame.
  • the timing information corresponding to the image frame can be determined, and the target normal information corresponding to the image frame can be determined based on the timing information. Since the time sequence information corresponding to each image frame is different, the target normal information corresponding to different image frames is also different. As the time sequence information gradually increases, the effect of gradual change of ice surface texture can be presented in different image frames.
  • 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.
  • the target media content may be constructed based on the adjusted plurality of image frames.
  • 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.
  • FIG9 is a schematic diagram of the structure of a media content processing device provided by an embodiment of the present disclosure.
  • the device includes: an acquisition module 91, a determination module 92, an adjustment module 93 and a lighting module 94.
  • the acquisition module 91 is used to obtain a media content processing request, and obtains the preset media content and the 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the adjustment module is used to: based on the normal information and The preset offset algorithm determines the offset information.
  • the pixels in the image frame corresponding to the preset media content are offset according to the offset information to obtain adjusted media content.
  • 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.
  • 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.
  • 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.
  • the present disclosure also provides an electronic device, including: a processor and a 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 as described in any of the above embodiments.
  • the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored.
  • a processor executes the computer-executable instructions, the media content processing method described in any of the above embodiments is implemented.
  • 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.
  • FIG10 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure
  • 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 terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
  • PDAs personal digital assistants
  • PMPs portable multimedia players
  • vehicle terminals such as vehicle navigation terminals
  • fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG10 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
  • 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.
  • a processing device e.g., a central processing unit, a graphics processing unit, etc.
  • RAM random access memory
  • Various programs and data required for the operation of the electronic device 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.
  • the following devices may be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, a touchpad, 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.
  • FIG. 10 shows an electronic device 1000 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
  • 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.
  • the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002.
  • the processing device 1001 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • 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.
  • Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, 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.
  • the computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device executes the method shown in the above embodiment.
  • Computer program code for carrying out 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 The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.
  • 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).
  • LAN Local Area Network
  • WAN Wide Area Network
  • each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function.
  • the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
  • each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or hardware.
  • the name of a unit does not limit the unit itself in some cases.
  • the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
  • FPGAs field programmable gate arrays
  • ASICs application specific integrated circuits
  • ASSPs application specific standard products
  • SOCs systems on chips
  • CPLDs complex programmable logic devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, 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.
  • RAM random access memory
  • ROM read-only memory
  • EPROM or flash memory erasable programmable read-only memory
  • CD-ROM portable compact disk read-only memory
  • CD-ROM compact disk read-only memory
  • magnetic storage device or any suitable combination of the foregoing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

提供一种媒体内容处理方法、装置、设备、可读存储介质及产品,该方法包括:获取媒体内容处理请求,根据媒体内容处理请求获取待处理的预设媒体内容以及噪声图(101);确定噪声图中像素对应的法线信息(102);基于法线信息对预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容(103);通过预设的虚拟光源对调整后的媒体内容进行重打光操作,获得目标媒体内容(104)。

Description

媒体内容处理方法、装置、设备、可读存储介质及产品
本申请要求于2023年11月10日递交的中国专利申请第202311499348.5号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开实施例涉及一种媒体内容处理方法、装置、设备、可读存储介质及产品。
背景技术
当前,越来越多的视频软件、社交软件走进了用户的生活。用户可以在视频软件、社交软件中发布媒体内容,以实现内容分享以及互动。
在发布媒体内容之前,用户一般需要对媒体内容进行编辑操作,以提高发布的媒体内容的内容质量。但是,当前的媒体内容编辑方法一般仅能够对媒体内容的色调、转场、长度等内容进行编辑,往往处理效果不佳,无法满足用户的实际需求。
发明内容
本公开实施例提供一种媒体内容处理方法,包括:
获取媒体内容处理请求,根据所述媒体内容处理请求获取待处理的预设媒体内容以及噪声图;
确定所述噪声图中像素对应的法线信息;
基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容;
通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容。
本公开实施例提供一种媒体内容处理装置,包括:
获取模块,用于获取媒体内容处理请求,根据所述媒体内容处理请求获取待处理的预设媒体内容以及噪声图;
确定模块,用于确定所述噪声图中像素对应的法线信息;
调整模块,用于基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容;
打光模块,用于通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容。
本公开实施例提供一种电子设备,包括:处理器和存储器;
所述存储器存储计算机执行指令;
所述处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上所述的媒体内容处理方法。
本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上所述的媒体内容处理方法。
本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上所述的媒体内容处理方法。
附图说明
为了更清楚地说明本公开实施例中的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的媒体内容处理方法的流程示意图;
图2为本公开实施例提供的噪声图示意图;
图3为本公开又一实施例提供的媒体内容处理方法的流程示意图;
图4为本公开实施例提供的漫反射示意图;
图5为本公开实施例提供的镜面反射示意图;
图6为本公开又一实施例提供的媒体内容处理方法的流程示意图;
图7为本公开又一实施例提供的媒体内容处理方法的流程示意图;
图8为本公开又一实施例提供的媒体内容处理方法的流程示意图;
图9为本公开实施例提供的媒体内容处理装置的结构示意图;以及
图10为本公开实施例提供的电子设备的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当依据相关法律法规通过恰当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息 来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限定性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式例如可以是弹窗的方式,弹窗中可以以文字的方式呈现提示信息。此外,弹窗中还可以承载供用户选择“同意”或者“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其它满足相关法律法规的方式也可应用于本公开的实现方式中。
为了解决现有的媒体内容处理方法效果不佳的技术问题,本公开提供了一种媒体内容处理方法、装置、设备、可读存储介质及产品。
需要说明的是,本公开提供的媒体内容处理方法、装置、设备、可读存储介质及产品可应用在任意一种对媒体内容进行处理的应用场景中。其中,媒体内容包括但不限于视频内容、图片内容等。
当前的媒体内容处理方法一般都是对媒体内容的色调、时长、转场等内容进行处理,但是,采用上述方法进行媒体内容处理时,媒体内容处理效果往往无法满足用户的实际需求。
在解决上述技术问题的过程中,发明人通过研究发现,为了提高媒体内容的处理效果,可以模拟在媒体内容表面的结冰效果。
可选地,为了实现结冰效果,可以获取到预设媒体内容以及噪声图,基于噪声图的法线信息对预设媒体内容中图像帧的像素分布进行调整,从而能够使得调整后的媒体内容模拟出类似结冰表面的折射效果。进一步地,可以预先设置虚拟光源,通过虚拟光源对调整后的媒体内容进行重打光操作,从而能够凸显出结冰表面的高光与阴影,增加结冰的透光真实感,提高媒体内容的处理效果。
进一步地,还可以根据图像帧的时序信息调整法线信息,基于调整后的法线信息对图像帧的像素分布进行调整,从而能够模拟冰块逐渐融化的显示效果,进一步地提高目标媒体内容的内容质量。
图1为本公开实施例提供的媒体内容处理方法的流程示意图,如图1所示,该方法包括:
步骤101、获取媒体内容处理请求,根据所述媒体内容处理请求获取待处理的预设媒体内容以及噪声图。
本实施例的执行主体为媒体内容处理装置,该媒体内容处理装置可耦合于服务器中。该服务器能够与终端设备以及数据服务器通信连接。从而能够基于终端设备发送的媒体内容处理请求,从数据服务器中获取预设媒体内容以及噪声图,基于噪声图对预设媒体内容进行处理,以在预设媒体内容上呈现冰块折射的效果。
或者,该媒体内容处理装置可耦合于终端设备中,从而能够响应于用户触发的媒体内容 处理请求获取预设以及噪声图,基于噪声图对预设媒体内容进行处理,以在预设媒体内容上呈现冰块折射的效果。
在本实施方式中,为了实现媒体内容处理操作,用户可以根据实际需求触发媒体内容处理请求。媒体内容处理装置在获取到媒体内容处理请求之后,首先可以获取待处理的预设媒体内容以及噪声图,从而能够基于噪声图对预设媒体内容进行处理,以在预设媒体内容上呈现冰面折射的显示效果。其中,该预设媒体内容可以为用户根据实际需求上传的,或者可以为实时采集的,本公开对此不做限制。
需要说明的是,该媒体内容可以为图像媒体内容,也可以为视频媒体内容,本公开对此不做限制。
图2为本公开实施例提供的噪声图示意图,如图2所示,噪声图21可以为采用分型布朗运动函数对预设的多种不同分布的噪声进行组合后形成的。该噪声图21可以模拟结冰的视觉效果,从而基于噪声图21的法线信息对预设媒体内容中的图像帧进行像素分布的调整,能够模拟在预设媒体内容表面结冰的视觉效果。
步骤102、确定所述噪声图中像素对应的法线信息。
在本实施方式中,在获取到噪声图之后,可以控制预设媒体内容中的图像帧模拟噪声图中的偏移以及扭曲程度,以呈现冰面折射的效果。为了实现对图像帧的像素分布的调整操作,首先需要确定噪声图中各像素对应的法线信息。
步骤103、基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容。
在本实施方式中,在得到噪声图中像素对应的法线信息之后,可以基于法线信息对预设媒体内容中的图像帧的像素分布进行调整,以使得图像帧能够模拟噪声图中的偏移以及扭曲程度,呈现冰面折射的效果,获得调整后的媒体内容。
步骤104、通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容。
在本实施方式中,为了增加结冰表面的透光真实感,还可以预先设置一个虚拟光源,通过虚拟光源对调整后的媒体内容进行重打光操作,获得目标媒体内容。该虚拟光源在进行重打光过程中,可以模拟光源到冰面的漫反射以及镜面反射效果,进一步凸显出材质上的高亮与阴影,且能够得到反光表面更细腻的高光效果,提升真实感。
作为一种可以实施的方式,在获得调整后的媒体内容或者目标媒体内容之后,可以在调整后的媒体内容或者目标媒体内容上叠加预设的色彩分布,从而能够模拟预设媒体内容的色彩透过冰面的显示效果。其中,该色彩分布可以为用户预先设置的,也可以为基于预设媒体内容对应的图像帧生成的,本公开对此不做限制。
本实施例提供的媒体内容处理方法,通过在获取到预设媒体内容以及噪声图之后,基于 噪声图的法线信息对预设媒体内容中图像帧的像素分布进行调整,从而能够使得调整后的媒体内容模拟出类似结冰表面的折射效果。进一步地,可以预先设置虚拟光源,通过虚拟光源对调整后的媒体内容进行重打光操作,从而能够凸显出结冰表面的高光与阴影,增加结冰的透光真实感,提高媒体内容的处理效果。
图3为本公开又一实施例提供的媒体内容处理方法的流程示意图,在上述任一实施例的基础上,如图3所示,步骤104包括:
步骤301、通过预设的光照模型确定所述虚拟光源对应的反射效果。
步骤302、在所述调整后的媒体内容上叠加所述反射效果,得到目标媒体内容。
在本实施例中,在设置虚拟光源之后,为了模拟虚拟光源照在冰面上的真实透光感,可以通过预设的光照模型确定虚拟光源对应的反射效果。在调整后的媒体内容上叠加反射效果,得到目标媒体内容。
其中,当媒体内容为视频媒体内容时,可以在视频媒体内容对应的每一帧图像帧中都叠加该反射效果。当媒体内容为图像媒体内容时,则可以直接在图像媒体内容上叠加该反射效果。
可选地,该反射效果可以由漫反射强度以及镜面反射强度共同组成。漫反射强度能够模拟真实的透光感,镜面反射强度则能够强调真实高光效果。
本实施例提供的媒体内容处理方法,通过基于光照模型确定所述虚拟光源对应的反射效果。并在所述调整后的媒体内容上叠加所述反射效果,得到目标媒体内容。从而能够增加结冰表面的透光真实感,提高媒体内容处理的真实性。
进一步地,在上述任一实施例的基础上,步骤301包括:
确定所述虚拟光源对应的位置信息。
基于所述虚拟光源对应的位置信息确定光照方向。
根据所述光照方向以及所述法线信息分别确定所述虚拟光源在所述重打光操作时产生的漫反射强度以及镜面反射强度。
基于所述漫反射强度以及所述镜面反射强度确定反射结果。
在本实施例中,为了确定虚拟光源对应的反射结果,首先可以确定虚拟光源对应的位置信息。其中,该虚拟光源的位置信息可以为用户根据实际需求设置的,或者,也可以为预设的,本公开对此不做限制。
进一步地,在确定虚拟光源的位置信息之后,即可以基于该位置信息确定虚拟光源照向冰面的光照方向。从而能够基于光照方向准确地模拟虚拟光源照射冰面的效果。
可选地,可以根据光照方向以及法线信息分别确定虚拟光源在重打光操作时产生的漫反射强度以及镜面反射强度。其中,可以通过法线方向和光照方向的点乘等计算得到漫反射强度和镜面反射强度,进而可以基于漫反射强度以及镜面反射强度确定反射结果。
图4为本公开实施例提供的漫反射示意图,如图4所示,漫反射示意图41能够模拟通过虚拟光源照射冰面时实际反射光感。
图5为本公开实施例提供的镜面反射示意图,如图5所示,镜面反射示意图51能够模拟虚拟光源照射冰面时的高光效果,提升目标媒体内容的真实感。
通过基于漫反射强度以及镜面反射强度确定反射结果,并在调整后的媒体内容上叠加该反射结果,从而能够增加结冰的透光真实感,其可以凸显出材质上的高亮与阴影。
本实施例提供的媒体内容处理方法,通过光照模型模拟光源到冰面的漫反射以及镜面反射效果,从而能够凸显出材质上的高亮与阴影,且能够得到反光表面更细腻的高光效果,提升真实感。
进一步地,在上述任一实施例的基础上,所述基于所述虚拟光源对应的位置信息确定光照方向,包括:
计算所述位置信息与所述图像帧对应的法线信息之间的差值,基于所述差值确定所述光照方向。
在本实施例中,可以通过计算位置信息与图像帧对应的法线信息之间的差值来确定虚拟光源的光照方向。例如,虚拟光源的位置信息为(X’,Y’,Z’),图像帧对应的法线信息为(X,Y,Z),可以通过计算(X’,Y’,Z’)与(X,Y,Z)之间的差值确定虚拟光源的光照方向。
本实施例提供的媒体内容处理方法,通过计算位置信息与图像帧对应的法线信息之间的差值,从而能够准确地确定虚拟光源的位置信息,进而能够准确地基于虚拟光源的位置信息确定虚拟光源的反射效果。
进一步地,在上述任一实施例的基础上,所述基于所述漫反射强度以及所述镜面反射强度确定反射结果,包括:
对所述漫反射强度以及所述镜面反射强度进行加权操作,获得反射结果。
在本实施例中,在分别确定漫反射强度以及镜面反射强度之后,可以对漫反射强度以及镜面反射强度进行加权操作,获得反射结果。其中,漫反射强度以及镜面反射强度对应的权重值可以相同。或者,用户也可以根据实际需求对漫反射强度以及镜面反射强度的权重进行调整,以呈现不同的光照效果。
本实施例提供的媒体内容处理方法,通过对漫反射强度以及镜面反射强度进行加权操作,从而能够准确地确定反射结果,该反射结果可以同时反应漫反射强度以及镜面反射强度,提高媒体内容处理的真实度。
图6为本公开又一实施例提供的媒体内容处理方法的流程示意图,在上述任一实施例的基础上,如图6所示,步骤102包括:
步骤601、将所述噪声图调整为灰度图。
步骤602、对所述灰度图中的像素进行第一坐标轴以及第二坐标轴方向的相邻像素求导, 将所述灰度图中的像素的第三坐标轴方向固定为预设方向,得到所述法线信息。
在本实施例中,在获取到噪声图之后,可以控制预设媒体内容中的图像帧模拟噪声图中的偏移以及扭曲程度,以呈现结冰表面的效果。
为了实现对图像帧的像素分布的调整操作,首先需要确定噪声图的法线信息。
可选地,可以将噪声图调整为灰度图。对灰度图中的像素进行第一坐标轴以及第二坐标轴方向的相邻像素求导,将灰度图中的像素的第三坐标轴方向固定为预设方向,得到法线信息。
其中,该第一坐标轴可以为下X轴,第二坐标轴可以为Y轴,第三坐标轴可以为Z轴。该预设方向可以为垂直朝外的方向。
本实施例提供的媒体内容处理方法,通过将噪声图转化为灰度图,再对灰度图的像素值进行x轴和y轴方向的相邻像素求导得梯度图来模拟其法线的xy轴方向,其中z轴方向固定为垂直朝外,从而能够准确地确定各像素点的法线信息。
图7为本公开又一实施例提供的媒体内容处理方法的流程示意图,在上述任一实施例的基础上,如图7所示,步骤103包括:
步骤701、基于所述法线信息以及预设的偏移算法确定偏移信息。
步骤702、根据偏移信息对所述预设媒体内容对应的图像帧中的像素进行偏移处理,获得调整后的媒体内容。
在本实施例中,在确定噪声图对应的法线信息之后,可以基于噪声图对应的法线信息确定偏移信息,并基于偏移信息对图像帧中的像素分布进行调整,以使图像帧能够模拟噪声图中的偏移以及扭曲程度,以呈现表面结冰折射的效果。
可选地,可以基于法线信息以及预设的偏移算法确定偏移信息。其中,该偏移算法可以为Open GV中预设的算法,或者,可以为其他任意一种能够基于法线信息实现偏移量计算的算法,本公开对此不做限制。
可选地,可以将法线信息与预设参数之间的差值与偏移程度参数相乘,得到初步结果。其中,在将法线信息减去预设参数之后,可能导致初步结果的取值范围与法线信息的取值范围不同。因此,还可以将初步结果的取值区间重新调整为原取值范围,得到偏移信息。例如,法线信息的取值范围可以为(-1,1)。
需要说明的是,用户可以根据实际需求对偏移程度参数进行调整,通过调整该偏移程度参数,可以对偏移信息进行调整。偏移信息越大,折射效果越明显。
进一步地,可以根据偏移信息对预设媒体内容对应的图像帧中的像素进行偏移处理,获得调整后的媒体内容。
可选地,可以将图像帧中的像素坐标与预设参数之间的和除2,得到初步结果,将初步结果与偏移信息相乘,实现对预设媒体内容对应的图像帧中的像素的偏移处理,获得调整后 的媒体内容。
本实施例提供的媒体内容处理方法,通过基于法线信息确定偏移信息,基于偏移信息对预设媒体内容对应的图像帧中的像素进行偏移处理,从而能够使得调整后的媒体内容模拟出类似结冰的折射效果,对预设媒体内容的材质进行调整,以提高目标媒体内容的显示效果。
图8为本公开又一实施例提供的媒体内容处理方法的流程示意图,在上述任一实施例的基础上,如图8所示,步骤102之后,还包括:
步骤801、针对预设媒体内容中的图像帧,确定所述图像帧对应的时序信息。
步骤802、根据所述时序信息以及预设的法线调整算法对法线信息进行调整操作,以使所述法线信息按照时序信息逐渐调整为预设法线。
在本实施例中,为了丰富目标媒体内容的显示效果,在基于噪声图的法线信息对图像帧进行像素分布的调整,模拟结冰的显示效果之后,还可以对冰面的质感进行渐变调整。例如,可以模拟冰面逐渐消失的效果。
为了实现冰面质感的渐变调整,针对预设媒体内容中的图像帧,可以确定图像帧对应的时序信息。其中,该时序信息可以为图像帧在预设媒体内容中的时间戳。
进一步地,可以基于时序信息以及预设的法线调整算法对法线信息进行调整操作,以使所述法线信息按照时序信息逐渐调整为预设法线。其中,该法线信息可以为(x,y,z),该预设法线可以为(0,0,1),通过将法线信息由(x,y,z)调整至(0,0,1),从而可以模拟冰面质感逐渐消失的效果。或者,该预设法线可以为用户根据实际需求设置的数值,以呈现不同的渐变效果,本公开对此不做限制。
可选地,法线调整算法可以为(1-t)*vec3(x,y,z)+t*vec3(0,0,1),通过该法线调整算法可以将法线信息线性地由(x,y,z)调整至(0,0,1),实现渐变效果。或者,也可以通过其他的渐变算法实现玻璃质感的渐变调整,本公开对此不做限制。
本实施例提供的媒体内容处理方法,通过根据所述时序信息以及预设的法线调整算法对法线信息进行调整操作,将法线信息按照时序信息逐渐调整为预设法线,从而能够模拟冰面质感逐渐消失的效果,丰富了媒体内容处理的显示效果,提高目标媒体内容的内容质量。
进一步地,在上述任一实施例的基础上,步骤103包括:
针对所述预设媒体内容中的每一图像帧,根据所述图像帧对应的时序信息确定所述图像帧对应的目标法线信息。
基于所述目标法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的图像帧。
根据调整后的图像帧获得所述调整后的媒体内容。
在本实施例中,为了使得预设媒体内容中能够呈现冰面质感渐变的效果,针对每一图像帧,可以确定该图像帧对应的时序信息。基于该时序信息确定该图像帧对应的目标法线信息。 由于每一图像帧对应的时序信息不同,因此,不同图像帧对应的目标法线信息也有所不同。随着时序信息的逐渐增加,能够在不同图像帧中呈现冰面质感渐变的效果。
可选地,在确定图像帧对应的目标法线信息之后,可以基于目标法线信息对预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容。由于每一图像帧对应的时序信息不同,因此,基于不同图像帧对应的目标法线信息调整后的图像帧也能够呈现不同的冰面折射效果。
进一步地,在基于各图像帧对应的目标法线信息对图像帧进行调整之后,可以基于调整后的多个图像帧构成目标媒体内容。
本实施例提供的媒体内容处理方法,通过针对每一图像帧,分别确定其对应的目标法线信息,从而能够在每一帧图像帧内呈现不同的冰面折射效果,精准地模拟冰面质感逐渐消失的效果。
图9为本公开实施例提供的媒体内容处理装置的结构示意图,如图9所示,该装置包括:获取模块91、确定模块92、调整模块93以及打光模块94。其中,获取模块91,用于获取媒体内容处理请求,根据所述媒体内容处理请求获取待处理的预设媒体内容以及噪声图。确定模块92,用于确定所述噪声图中像素对应的法线信息。调整模块93,用于基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容。打光模块94,用于通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容。
进一步地,在上述任一实施例的基础上,所述打光模块,用于:通过预设的光照模型确定所述虚拟光源对应的反射效果。在所述调整后的媒体内容上叠加所述反射效果,得到目标媒体内容。
进一步地,在上述任一实施例的基础上,所述打光模块,用于:确定所述虚拟光源对应的位置信息。基于所述虚拟光源对应的位置信息确定光照方向。根据所述光照方向以及所述法线信息分别确定所述虚拟光源在所述重打光操作时产生的漫反射强度以及镜面反射强度。基于所述漫反射强度以及所述镜面反射强度确定反射结果。
进一步地,在上述任一实施例的基础上,所述打光模块,用于:计算所述位置信息与所述图像帧对应的法线信息之间的差值,基于所述差值确定所述光照方向。
进一步地,在上述任一实施例的基础上,所述打光模块,用于:对所述漫反射强度以及所述镜面反射强度进行加权操作,获得反射结果。
进一步地,在上述任一实施例的基础上,所述确定模块,用于:将所述噪声图调整为灰度图。对所述灰度图中的像素进行第一坐标轴以及第二坐标轴方向的相邻像素求导,将所述灰度图中的像素的第三坐标轴方向固定为预设方向,得到所述法线信息。
进一步地,在上述任一实施例的基础上,所述调整模块,用于:基于所述法线信息以及 预设的偏移算法确定偏移信息。根据偏移信息对所述预设媒体内容对应的图像帧中的像素进行偏移处理,获得调整后的媒体内容。
进一步地,在上述任一实施例的基础上,所述装置还包括:确定模块,用于针对预设媒体内容中的图像帧,确定所述图像帧对应的时序信息。调整模块,用于根据所述时序信息以及预设的法线调整算法对法线信息进行调整操作,以使所述法线信息按照时序信息逐渐调整为预设法线。
进一步地,在上述任一实施例的基础上,所述调整模块,用于:针对所述预设媒体内容中的每一图像帧,根据所述图像帧对应的时序信息确定所述图像帧对应的目标法线信息。基于所述目标法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的图像帧。根据调整后的图像帧获得所述调整后的媒体内容。
本实施例提供的设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
为了实现上述实施例,本公开实施例还提供了一种电子设备,包括:处理器和存储器;
所述存储器存储计算机执行指令;
所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如上述任一实施例所述的媒体内容处理方法。
为了实现上述实施例,本公开实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上述任一实施例所述的媒体内容处理方法。
为了实现上述实施例,本公开实施例还提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述任一实施例所述的媒体内容处理方法。
图10为本公开实施例提供的电子设备的结构示意图,该电子设备1000可以为终端设备或服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图10示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图10所示,电子设备1000可以包括处理装置(例如中央处理器、图形处理器等)1001,其可以根据存储在只读存储器(Read Only Memory,简称ROM)1002中的程序或者从存储装置1008加载到随机访问存储器(Random Access Memory,简称RAM)1003中的程序而执行各种适当的动作和处理。在RAM 1003中,还存储有电子设备1000操作所需的各种程序和数据。处理装置1001、ROM 1002以及RAM 1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。
通常,以下装置可以连接至I/O接口1005:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1006;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置1007;包括例如磁带、硬盘等的存储装置1008;以及通信装置1009。通信装置1009可以允许电子设备1000与其他设备进行无线或有线通信以交换数据。虽然图10示出了具有各种装置的电子设备1000,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1009从网络上被下载和安装,或者从存储装置1008被安装,或者从ROM 1002被安装。在该计算机程序被处理装置1001执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包 括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而 形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (12)

  1. 一种媒体内容处理方法,包括:
    获取媒体内容处理请求,根据所述媒体内容处理请求获取待处理的预设媒体内容以及噪声图;
    确定所述噪声图中像素对应的法线信息;
    基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容;
    通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容。
  2. 根据权利要求1所述的方法,其中,所述通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容,包括:
    通过预设的光照模型确定所述虚拟光源对应的反射效果;
    在所述调整后的媒体内容上叠加所述反射效果,得到所述目标媒体内容。
  3. 根据权利要求2所述的方法,其中,所述通过预设的光照模型确定所述虚拟光源对应的反射效果,包括:
    确定所述虚拟光源对应的位置信息;
    基于所述虚拟光源对应的位置信息确定光照方向;
    根据所述光照方向以及所述法线信息分别确定所述虚拟光源在所述重打光操作时产生的漫反射强度以及镜面反射强度;
    基于所述漫反射强度以及所述镜面反射强度确定反射结果。
  4. 根据权利要求3所述的方法,其中,所述基于所述虚拟光源对应的位置信息确定光照方向,包括:
    计算所述位置信息与所述图像帧对应的法线信息之间的差值,基于所述差值确定所述光照方向。
  5. 根据权利要求3或4所述的方法,其中,所述基于所述漫反射强度以及所述镜面反射强度确定反射结果,包括:
    对所述漫反射强度以及所述镜面反射强度进行加权操作,获得所述反射结果。
  6. 根据权利要求1-5任一项所述的方法,其中,所述确定所述噪声图中像素对应的法线信息,包括:
    将所述噪声图调整为灰度图;
    对所述灰度图中的像素进行第一坐标轴以及第二坐标轴方向的相邻像素求导,将所述灰度图中的像素的第三坐标轴方向固定为预设方向,得到所述法线信息。
  7. 根据权利要求1-5任一项所述的方法,其中,所述基于所述法线信息对所述预设媒体 内容中的图像帧的像素分布进行调整,获得调整后的媒体内容,包括:
    基于所述法线信息以及预设的偏移算法确定偏移信息;
    根据所述偏移信息对所述预设媒体内容对应的图像帧中的像素进行偏移处理,获得所述调整后的媒体内容。
  8. 根据权利要求1-5任一项所述的方法,其中,所述确定所述噪声图中像素对应的法线信息之后,所述方法还包括:
    针对所述预设媒体内容中的图像帧,确定所述图像帧对应的时序信息;
    根据所述时序信息以及预设的法线调整算法对所述法线信息进行调整操作,以使所述法线信息按照所述时序信息逐渐调整为预设法线。
  9. 根据权利要求8所述的方法,其中,所述基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容,包括:
    针对所述预设媒体内容中的每一图像帧,根据所述图像帧对应的时序信息确定所述图像帧对应的目标法线信息;
    基于所述目标法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的图像帧;
    根据所述调整后的图像帧获得所述调整后的媒体内容。
  10. 一种媒体内容处理装置,包括:
    获取模块,被配置为获取媒体内容处理请求,根据所述媒体内容处理请求获取待处理的预设媒体内容以及噪声图;
    确定模块,被配置为确定所述噪声图中像素对应的法线信息;
    调整模块,被配置为基于所述法线信息对所述预设媒体内容中的图像帧的像素分布进行调整,获得调整后的媒体内容;以及
    打光模块,被配置为通过预设的虚拟光源对所述调整后的媒体内容进行重打光操作,获得目标媒体内容。
  11. 一种电子设备,包括:处理器和存储器;
    所述存储器存储计算机执行指令;
    所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如权利要求1至9任一项所述的媒体内容处理方法。
  12. 一种计算机可读存储介质,其中,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1至9任一项所述的媒体内容处理方法。
PCT/CN2024/131276 2023-11-10 2024-11-11 媒体内容处理方法、装置、设备、可读存储介质及产品 Pending WO2025098511A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311499348.5 2023-11-10
CN202311499348.5A CN119996590B (zh) 2023-11-10 2023-11-10 媒体内容处理方法、装置、设备、可读存储介质及产品

Publications (1)

Publication Number Publication Date
WO2025098511A1 true WO2025098511A1 (zh) 2025-05-15

Family

ID=95645794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/131276 Pending WO2025098511A1 (zh) 2023-11-10 2024-11-11 媒体内容处理方法、装置、设备、可读存储介质及产品

Country Status (2)

Country Link
CN (1) CN119996590B (zh)
WO (1) WO2025098511A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111830810A (zh) * 2020-06-12 2020-10-27 北京邮电大学 表现体素上真实光照的计算全息图生成方法和装置
CN113610955A (zh) * 2021-08-11 2021-11-05 北京果仁互动科技有限公司 一种对象渲染方法、装置及着色器
CN114331823A (zh) * 2021-12-29 2022-04-12 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质
CN114998502A (zh) * 2022-04-21 2022-09-02 网易(杭州)网络有限公司 冰冻效果模型的渲染方法、装置和电子设备
CN115733938A (zh) * 2021-08-31 2023-03-03 北京字跳网络技术有限公司 视频处理方法、装置、设备及存储介质
WO2023088348A1 (zh) * 2021-11-22 2023-05-25 北京字节跳动网络技术有限公司 绘制图像的方法、装置、电子设备及存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4237429B2 (ja) * 2001-08-23 2009-03-11 富士フイルム株式会社 画像信号処理装置および欠陥画素補正方法
CN112767238A (zh) * 2020-12-31 2021-05-07 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质
CN116194961A (zh) * 2021-09-27 2023-05-30 京东方科技集团股份有限公司 水纹仿真方法及装置、电子设备、存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111830810A (zh) * 2020-06-12 2020-10-27 北京邮电大学 表现体素上真实光照的计算全息图生成方法和装置
CN113610955A (zh) * 2021-08-11 2021-11-05 北京果仁互动科技有限公司 一种对象渲染方法、装置及着色器
CN115733938A (zh) * 2021-08-31 2023-03-03 北京字跳网络技术有限公司 视频处理方法、装置、设备及存储介质
WO2023088348A1 (zh) * 2021-11-22 2023-05-25 北京字节跳动网络技术有限公司 绘制图像的方法、装置、电子设备及存储介质
CN114331823A (zh) * 2021-12-29 2022-04-12 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质
CN114998502A (zh) * 2022-04-21 2022-09-02 网易(杭州)网络有限公司 冰冻效果模型的渲染方法、装置和电子设备

Also Published As

Publication number Publication date
CN119996590A (zh) 2025-05-13
CN119996590B (zh) 2026-03-13

Similar Documents

Publication Publication Date Title
US20240289099A1 (en) Method and apparatus of control editing, device, and readable storage medium
CN112258622B (zh) 图像处理方法、装置、可读介质及电子设备
CN111243049A (zh) 人脸图像的处理方法、装置、可读介质和电子设备
WO2024198855A1 (zh) 场景渲染方法、装置、设备、计算机可读存储介质及产品
CN114332323B (zh) 一种粒子效果渲染方法、装置、设备及介质
WO2025108379A1 (zh) 图像处理方法、装置、设备、计算机可读存储介质及产品
WO2025056026A1 (zh) 视频处理方法、装置、设备、计算机可读存储介质及产品
WO2025189959A1 (zh) 图像处理方法、装置、介质、程序产品及电子设备
WO2025002075A1 (zh) 视频生成方法、装置、电子设备及存储介质
WO2024131621A1 (zh) 特效生成方法、装置、电子设备及存储介质
US20250104354A1 (en) Virtual object generation method and apparatus, device, and storage medium
CN115018699B (zh) 点云数据的过滤方法、装置、设备及介质
CN110134905B (zh) 一种页面更新显示方法、装置、设备及存储介质
CN112465940A (zh) 图像渲染方法、装置、电子设备及存储介质
WO2026002162A1 (zh) 图像处理方法、装置、电子设备及存储介质
WO2025098511A1 (zh) 媒体内容处理方法、装置、设备、可读存储介质及产品
WO2025119233A1 (zh) 视频处理方法、装置、设备、计算机可读存储介质及计算机程序产品
WO2025056031A1 (zh) 视频处理方法、装置、设备、计算机可读存储介质及产品
WO2025067334A1 (zh) 特效添加方法、装置、电子设备以及存储介质
WO2025036409A1 (zh) 媒体内容处理方法、设备、存储介质及程序产品
CN117348868A (zh) 交互式样式模板生成方法、装置、电子设备及存储介质
CN112651888B (zh) 图像处理方法、装置、电子设备及存储介质
CN113066166A (zh) 图像处理方法、装置和电子设备
WO2025148591A1 (zh) 图像处理方法、装置、电子设备以及存储介质
WO2025002428A1 (zh) 直播处理方法、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24888122

Country of ref document: EP

Kind code of ref document: A1