Video blurring processing method and apparatus thereof
By performing depth estimation and blurring processing during video recording, the blurring video is generated and the video is saved during storage, the problem of low processing efficiency during video playback and sharing is solved, and faster video processing and storage space is achieved.
Patent Information
- Application Number
- PCT/CN2024/119918
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-27
- Filing Date
- 2024-09-20
- Publication Date
- 2025-04-03
AI Technical Summary
When recording videos, the original video files and depth information files need to be blurred during playback or sharing, resulting in slow processing efficiency.
A video blurring processing method is provided, by receiving video input, performing depth estimation processing and segmentation information processing, generating depth infographics and segmentation information maps, and blurring the original video to generate the blurred video. This method is blurred and saved during recording, reducing the processing time during subsequent playback or sharing.
By performing blur processing and saving during the recording process in advance, the video playback and sharing speed is significantly improved, the video processing efficiency is improved, and storage space is saved.
Smart Images

Figure CN2024119918_03042025_PF_FP_ABST
Abstract
Description
Video blur processing method and device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese Patent Application No. 202311263608.9 filed in China on September 27, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present application belongs to the field of video processing technology, and specifically relates to a video blurring processing method and device thereof. Background Art
[0004] Common portraits in movies and TV shows are blurred. After the portrait is blurred and beautified, the portrait in the video is more beautiful and advanced. Blurring the video image has also become one of the common video processing methods.
[0005] Currently, when recording a video, the saved video file is the original video file without the blur effect, the corresponding depth information file, and a focus description file. When the user needs to process the recorded video, such as playing or sharing the recorded video file, it needs to be blurred on the mobile phone before it can be played or shared, resulting in slow video processing efficiency.
[0006] Summary of the Invention
[0007] The purpose of the embodiments of the present application is to provide a video blur processing method and device thereof, which solves the problem of slow processing efficiency of video playback or sharing in related technologies and can improve the processing efficiency of videos.
[0008] In a first aspect, an embodiment of the present application provides a method for processing video blur, comprising:
[0009] Receiving a first input of a first video;
[0010] In response to the first input, performing depth estimation processing on the first video to obtain a depth information map and a segmentation information map of the first video;
[0011] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a blurred second video;
[0012] Wherein, when the first input is a recording operation, saving the second video; or,
[0013] When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
[0014] In a second aspect, an embodiment of the present application provides a video blur processing device, comprising:
[0015] A receiving module, configured to receive a first input of a first video;
[0016] a first processing module, configured to perform depth estimation processing on the first video in response to the first input, to obtain a depth information map and a segmentation information map of the first video;
[0017] A second processing module is configured to perform blurring processing on the first video, the depth information map, and the segmentation information map to obtain a blur-processed second video;
[0018] Wherein, when the first input is a recording operation, the device is further configured to save the second video; or,
[0019] When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
[0020] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0021] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0022] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method described in the first aspect.
[0023] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the method described in the first aspect.
[0024] In an embodiment of the present application, when receiving a recording operation for a first video, the first video is blurred to obtain a blurred second video, and the second video is saved, so that when the electronic device subsequently wants to share the video, the blurred second video can be quickly played or shared, which can effectively improve the playback or sharing speed of the blurred video, thereby improving the processing efficiency of the video. Alternatively, when receiving a playback operation or sharing operation for the recorded first video, the first video is blurred to obtain a blurred second video, so that the blurred second video can be quickly shared and played, which can effectively improve the processing efficiency of the video and effectively save the storage space of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] FIG1 is a flowchart of a method for processing video blurring provided by an embodiment of the present application;
[0026] FIG2 is a second flowchart of a video blur processing method provided by an embodiment of the present application;
[0027] FIG3 is a structural diagram of a video blur processing device provided in an embodiment of the present application;
[0028] FIG4 is a structural diagram of an electronic device provided in an embodiment of the present application;
[0029] FIG5 is a structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0031] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] The video blur processing method, device, and electronic device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0033] Please refer to Figure 1, which is a flow chart of a method for processing video blur provided by an embodiment of the present application. The method is applied to electronic devices such as mobile phones, tablet computers, and computers. As shown in Figure 1, the method includes the following steps:
[0034] Step 101: Receive a first input of a first video.
[0035] Optionally, the first input may be a recording operation of the first video, or the first input may be a sharing operation or a playing operation of the first video.
[0036] Step 102: In response to the first input, perform depth estimation processing on the first video to obtain a depth information map and a segmentation information map of the first video.
[0037] In an embodiment of the present application, when the electronic device receives a first input of a first video, such as a recording operation of the first video, or a playback operation or sharing operation of the recorded first video, the electronic device may be based on a neural network processing unit (NPU) performing an artificial intelligence (AI) algorithm depth estimation process on the first video to obtain a depth information map (depthMap) and a segmentation information map (segmentMap) of the first video. For example, the electronic device may input the first video into the NPU, and the NPU performs an AI algorithm process on the input first video to output a depth information map and a segmentation information map. The NPU may be pre-trained, and the trained NPU can output a depth information map and a segmentation information map for the input video. The specific training method and working principle of the NPU may be based on the training principle of the neural network model in the relevant technology, and the embodiment of the present application will not be described in detail.
[0038] Step 103: blur the first video, the depth information map, and the segmentation information map to obtain a blurred second video.
[0039] Wherein, when the first input is a recording operation, saving the second video; or,
[0040] When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
[0041] For example, when receiving a recording operation for a first video, the first video is defocused to obtain a second video after defocusing. It should be noted that since the recording operation for the first video is received, the first video will also be recorded. The defocusing of the first video can mean that while recording the first video, the original first video is subjected to depth estimation processing to obtain a depth information map and a segmentation information map of the first video, and then defocusing the first video based on the depth information map, the segmentation information map, and the first video to obtain a second video, which is the defocused video; or, the depth estimation processing and defocusing processing can be performed on the recorded first video based on the recorded first video to obtain the defocused second video. In this way, the first video can be defocused when the first video is recorded to obtain the defocused second video, and the second video can be saved. When the electronic device wants to share the video later, the defocused second video can be shared quickly without having to defocus the video again when sharing. This can effectively improve the sharing speed or playback speed of the defocused video and improve the video processing efficiency of the electronic device.
[0042] Alternatively, in another optional embodiment, the electronic device first records the third video to obtain the first video, and the third video can be considered as the original video of the first video. In this embodiment, when the electronic device receives the recording operation of the third video, the first video obtained by recording the third video is defocused, but the third video is not defocused. In some scenarios, the first video can be considered to be the same video as the third video. When receiving the sharing operation or playback operation of the recorded first video, the depth estimation processing is performed on the recorded first video to obtain the depth information map and segmentation information map of the first video, and then the defocusing processing is performed based on the depth information map, the segmentation information map and the first video to obtain the defocused second video. It should be noted that in this embodiment, when the electronic device is sharing and playing the video, the video defocusing processing is performed in real time to generate the defocused video, thereby quickly realizing the sharing and playback of the video, improving the processing efficiency of the video, and in addition, there is no need to save the video generated by the defocusing processing, which can effectively save the power consumption and memory space of the electronic device.
[0043] In an embodiment of the present application, when receiving a recording operation for a first video, the first video is blurred to obtain a second video after the blurring process, and the second video is saved, so that when the electronic device wants to share the video later, the second video after the blurring process can be quickly shared, which can effectively improve the sharing speed of the blurred video, thereby improving the processing efficiency of the video. Alternatively, when receiving a playback operation or sharing operation for the recorded first video, the first video is blurred to obtain a second video after the blurring process, so that the blurring process can be performed in real time when the video is shared or played, so as to obtain the second video after the blurring process and quickly share and play it, which can effectively improve the processing efficiency of the video and effectively save the storage space of the electronic device.
[0044] Optionally, the performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a blurred second video includes:
[0045] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurring video;
[0046] The second video is generated based on the first video, the depth information map, the segmentation information map and the first blurred video.
[0047] In an embodiment of the present application, after the electronic device performs depth estimation processing on the first video to obtain the depth information map and segmentation information map of the first video, the electronic device further performs blurring processing on the first video, the depth information map and the segmentation information map to obtain a first blurred video. Optionally, the electronic device can be based on an application-specific integrated circuit (ASIC) hardware module responsible for portrait blurring, and blurring the first video, the depth information map and the segmentation information map through a main blurring technology (such as Bokeh), thereby obtaining a first blurred video. The first blurred video is also the video generated after the blurring processing, with a blurring effect. Then, a second video is generated based on the first video, the depth information map, the segmentation information map and the first blurred video. Furthermore, the second video includes the first video, and the second video is generated on the basis of the first video in combination with the depth information map, the segmentation information map and the first blurred video, that is, the recording of the first video is completed. At the same time, the second video also includes the depth information map, the segmentation information map and the first blurred video of the first video, wherein the first blurred video has a blurred effect, and then the second video is also a video with a blurred effect. When the video needs to be shared or played in the future, the second video with the blurred effect can be shared quickly, or the second video with the blurred effect can be played directly, thereby effectively improving the sharing speed or playback speed of the blurred video.
[0048] Optionally, generating the second video based on the first video, the depth information map, the segmentation information map, and the first blurred video includes:
[0049] Encoding the first video, the depth information map, the segmentation information map, and the first defocused video to obtain a first video stream, an image depth stream, an image segmentation stream, and a defocused video stream, respectively;
[0050] The second video is generated according to the first video code stream, the image depth code stream, the image segmentation code stream and the defocused video code stream.
[0051] In an embodiment of the present application, after obtaining the first video, the depth information map, the segmentation information map, and the first defocused video based on the above-mentioned processing method, the first video is encoded to obtain a first video stream, the depth information map is encoded to obtain an image depth stream, the segmentation information map is encoded to obtain an image segmentation stream, and the first defocused video is encoded to obtain a defocused video stream. Then, these four streams are encapsulated to obtain a second video. Furthermore, the second video is also encapsulated by the first video stream, the image depth stream, the image segmentation stream, and the defocused video stream. The second video is saved in the form of a stream, which is more conducive to the rapid sharing and playback of the second video. In addition, the second video includes the original first video stream and the defocused video stream. When playing or sharing, the defocused video stream can be quickly extracted, thereby eliminating the need for defocusing during playback or sharing, effectively improving the efficiency of video sharing and playback, thereby improving the efficiency of video processing by electronic devices.
[0052] It should be noted that the electronic device may encode the above information in a High Efficiency Video Codec (HEVC) manner to obtain a corresponding code stream.
[0053] Optionally, when encapsulating the first video stream, the image depth stream, the image segmentation stream, and the defocused video stream, the audio data (Audio) and metadata (metadata) of the first video may also be added for encapsulation, thereby obtaining a final multimedia video file, i.e., the second video. The metadata is used to describe the relevant information and corresponding defocused information of the first video, so that when sharing and playing the second video, the defocused video stream can be determined or extracted more quickly from the second video based on the metadata, which helps to improve the efficiency of video sharing and playback processing.
[0054] Optionally, performing depth estimation processing on the first video includes:
[0055] Performing video size compression processing on the first video;
[0056] Depth estimation is performed on the compressed first video.
[0057] Exemplarily, the electronic device may perform video size compression processing on the first video through an image signal processing (ISP) unit to obtain a video of smaller size, and then perform depth estimation processing on the compressed first video through an NPU to obtain a depth information map and a segmentation information map.
[0058] In an embodiment of the present application, by first performing video compression processing on the first video and then performing depth estimation processing on the compressed first video, the size of the first video input to the NPU can be effectively reduced, thereby effectively saving power consumption when the electronic device performs depth estimation processing, and also helping to improve the processing efficiency of the electronic device performing depth estimation processing.
[0059] Optionally, when the first input is a recording operation, after generating the blurred second video, the method further includes:
[0060] When a sharing operation on the second video is received, sharing the second video; or,
[0061] When a play operation for the second video is received, the second video is played.
[0062] In an embodiment of the present application, when the electronic device receives a recording operation for a first video, it performs depth estimation and blurring processing on the first video to obtain a second video after blurring, and saves the second video. The second video is also a video that has been blurred, that is, a video with a blurring effect. Furthermore, when a sharing operation or a playback operation is received for the second video, the electronic device can directly share or play the second video that has been blurred and saved, that is, share or play the video with a blurring effect. In this way, there is no need to blur the video when sharing or playing the video, which can effectively improve the sharing and playback speed of the blurred video, thereby improving the video processing efficiency of the electronic device.
[0063] Optionally, the performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a blurred second video includes:
[0064] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurring video;
[0065] Generate a defocused video stream according to the first defocused video;
[0066] The second video is generated based on the virtualized video stream.
[0067] In an embodiment of the present application, an electronic device receives a first input of a first video, performs depth estimation processing on the first video, obtains a depth information map and a segmentation information map of the first video, then performs blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurred video with a blurring effect, then generates a blurred video code stream based on the first blurred video, and then generates a second video based on the blurred video code stream. In other words, the second video only includes a blurred video code stream, and the blurred video code stream is obtained based on the first blurred video with a blurring effect. The blurred video code stream is also a video code stream with a blurring effect. The second video generated based on the code stream also has a blurring effect. The second video is also a blurred video. In this way, the electronic device only needs to save the blurred video code stream, and can generate a second video with a blurring effect based on the blurred video code stream, which can effectively reduce the file size of the second video, thereby effectively saving the storage space of the electronic device.
[0068] It should be noted that when the second video only includes a virtualized video code stream, the second video can be associated with the first video. When the second video is subsequently played or shared, it can be shared or played together with the associated first video, so as to ensure the integrity of the video seen at the sharing end or the playing end.
[0069] Optionally, for the second video generated after the blurring process, when the second video is shared or played, the blurring effect of the second video can also be edited at the sharing end or the playing end, such as adjusting the blurring degree, blurring radius and other parameters of the second video to adjust the blurring effect intensity of the second video, thereby making it more convenient for users to operate the second video after the blurring process, so as to better meet the user's own display requirements for the blurring effect intensity.
[0070] Please refer to Figure 2, which is a second flow chart of a video blur processing method provided by an embodiment of the present application. As shown in Figure 2, when the electronic device needs to blur the first video, it first processes the first video through the ISP unit, outputs the original first video (for example, it can be in NV12 format), and encodes the original first video through the HEVC encoder to obtain a first video stream; at the same time, the ISP outputs a compressed video with a smaller size, and inputs the video into the NPU for depth estimation processing of the AI algorithm. The NPU outputs a depth information map and a segmentation information map. The depth information map and the segmentation information map are respectively encoded by the HEVC encoder to obtain an image depth stream and an image segmentation stream; in addition, the ASIC unit responsible for portrait blurring blurs the depth information map, the segmentation information map and the original first video through the Bokeh technology to generate a first blurred video after blurring, and encodes the first blurred video through the HEVC encoder to obtain a blurred video stream. Finally, the first video code stream, the blurred video code stream, the image depth code stream and the image segmentation code stream are added to the audio data (audio) and metadata (metadata) of the first video and packaged together to generate a second video. The second video is also a video with a blurred effect. The electronic device can save the second video, so that when the video needs to be shared or played later, the second video can be directly shared or played, effectively improving the efficiency of electronic devices in sharing and playing blurred videos.
[0071] The video blur processing method provided in the embodiment of the present application can be executed by a video blur processing device. In the embodiment of the present application, the video blur processing device executing the video blur processing method is taken as an example to illustrate the video blur processing device provided in the embodiment of the present application.
[0072] Please refer to FIG3 , which is a structural diagram of a video blur processing device provided in an embodiment of the present application. As shown in FIG3 , the video blur processing device 300 includes:
[0073] Receiving module 301, configured to receive a first input of a first video;
[0074] A first processing module 302 is configured to perform depth estimation processing on the first video in response to the first input to obtain a depth information map and a segmentation information map of the first video;
[0075] A second processing module 303 is configured to perform blurring processing on the first video, the depth information map, and the segmentation information map to obtain a blurred second video;
[0076] Wherein, when the first input is a recording operation, the device is further configured to save the second video; or,
[0077] When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
[0078] Optionally, the second processing module 303 includes:
[0079] a second processing unit, configured to perform blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurring video;
[0080] A generating unit is configured to generate the second video based on the first video, the depth information map, the segmentation information map, and the first blurred video.
[0081] Optionally, the generating unit is further configured to:
[0082] Encoding the first video, the depth information map, the segmentation information map, and the first defocused video to obtain a first video stream, an image depth stream, an image segmentation stream, and a defocused video stream, respectively;
[0083] The second video is generated according to the first video code stream, the image depth code stream, the image segmentation code stream and the defocused video code stream.
[0084] Optionally, the first processing module 302 is further configured to:
[0085] Performing video size compression processing on the first video;
[0086] Depth estimation is performed on the compressed first video.
[0087] Optionally, when the first input is a recording operation, the apparatus further includes:
[0088] The sharing module is configured to share the second video upon receiving a sharing operation on the second video.
[0089] Optionally, the second processing module 303 is further configured to:
[0090] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurring video;
[0091] Generate a defocused video stream according to the first defocused video;
[0092] The second video is generated based on the virtualized video stream.
[0093] The device provided in the embodiment of the present application can quickly play or share the second video after blurring, thereby effectively improving the playback or sharing speed of the blurred video and improving the video processing efficiency; or, it can perform blurring in real time when sharing or playing the video to generate the second video after blurring and quickly share and play it, thereby improving the video processing efficiency and effectively saving storage space of the electronic device.
[0094] The video blur processing device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.
[0095] The video blur processing device in the embodiment of the present application can be a device having an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0096] The video blur processing device provided in the embodiment of the present application can implement each process implemented by the method embodiment described in Figure 1. To avoid repetition, it will not be described here.
[0097] Optionally, as shown in Figure 4, an embodiment of the present application also provides an electronic device 400, including a processor 401 and a memory 402, and the memory 402 stores a program or instruction that can be run on the processor 401. When the program or instruction is executed by the processor 401, the various steps of the above-mentioned video blur processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0098] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0099] FIG5 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0100] The electronic device 500 includes but is not limited to components such as a radio frequency unit 501 , a network module 502 , an audio output unit 503 , an input unit 504 , a sensor 505 , a display unit 506 , a user input unit 507 , an interface unit 508 , a memory 509 , and a processor 510 .
[0101] Those skilled in the art will appreciate that the electronic device 500 may further include a power source (e.g., a battery) to power various components. The power source may be logically connected to the processor 510 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG5 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components or arrange the components differently, which will not be described in detail here.
[0102] The processor 510 is configured to:
[0103] Receiving a first input of a first video;
[0104] In response to the first input, performing depth estimation processing on the first video to obtain a depth information map and a segmentation information map of the first video;
[0105] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a blurred second video;
[0106] Wherein, in the case where the first input is a recording operation, the processor 510 is further configured to save the second video; or,
[0107] When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
[0108] Optionally, the processor 510 is further configured to:
[0109] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurring video;
[0110] The second video is generated based on the first video, the depth information map, the segmentation information map and the first blurred video.
[0111] Optionally, the processor 510 is further configured to:
[0112] Encoding the first video, the depth information map, the segmentation information map, and the first defocused video to obtain a first video stream, an image depth stream, an image segmentation stream, and a defocused video stream, respectively;
[0113] The second video is generated according to the first video code stream, the image depth code stream, the image segmentation code stream and the defocused video code stream.
[0114] Optionally, the processor 510 is further configured to:
[0115] Performing video size compression processing on the first video;
[0116] Depth estimation is performed on the compressed first video.
[0117] Optionally, the processor 510 is further configured to:
[0118] When a sharing operation on the second video is received, the second video is shared.
[0119] Optionally, the processor 510 is further configured to:
[0120] Performing blurring processing on the first video, the depth information map, and the segmentation information map to obtain a first blurring video;
[0121] Generate a defocused video stream according to the first defocused video;
[0122] The second video is generated based on the virtualized video stream.
[0123] The electronic device provided in the embodiment of the present application can quickly play or share the second video after blurring, thereby effectively improving the playback or sharing speed of the blurred video and improving the video processing efficiency; or, it can perform blurring in real time when sharing or playing the video to generate the second video after blurring and quickly share and play it, thereby improving the video processing efficiency and effectively saving storage space of the electronic device.
[0124] It should be understood that in an embodiment of the present application, the input unit 504 may include a graphics processing unit (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.
[0125] The memory 509 can be used to store software programs and various data. The memory 509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 509 may include a volatile memory or a non-volatile memory, or the memory x09 may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0126] Processor 510 may include one or more processing units. Optionally, processor 510 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 510.
[0127] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned video blur processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0128] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0129] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video blur processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0130] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0131] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned video blur processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0132] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0133] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0134] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A video blur processing method, comprising: Receiving a first input of a first video; In response to the first input, performing depth estimation processing on the first video to obtain a depth information map and a segmentation information map of the first video; Performing blur processing on the first video, the depth information map, and the segmentation information map to obtain a blur-processed second video; Wherein, when the first input is a recording operation, saving the second video; or, When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
2. The method according to claim 1, wherein: The blurring the first video, the depth information map, and the segmentation information map to obtain a blur-processed second video includes: Performing blur processing on the first video, the depth information map, and the segmentation information map to obtain a first blur video; The second video is generated based on the first video, the depth information map, the segmentation information map and the first blurred video.
3. The method according to claim 2, wherein: The generating the second video based on the first video, the depth information map, the segmentation information map and the first blurred video includes: Encoding the first video, the depth information map, the segmentation information map and the first defocused video respectively to obtain a first video bitstream, an image depth bitstream, an image segmentation bitstream and a defocused video bitstream; The second video is generated according to the first video code stream, the image depth code stream, the image segmentation code stream and the virtualized video code stream.
4. The method according to any one of claims 1 to 3, wherein: The performing depth estimation processing on the first video includes: Performing video size compression processing on the first video; Depth estimation is performed on the compressed first video.
5. The method according to claim 1, wherein: The blurring the first video, the depth information map, and the segmentation information map to obtain a blur-processed second video includes: Performing blur processing on the first video, the depth information map, and the segmentation information map to obtain a first blur video; Generate a virtualized video code stream according to the first virtualized video; The second video is generated based on the virtualized video code stream.
6. A video blur processing device, comprising: A receiving module, configured to receive a first input of a first video; A first processing module, configured to perform depth estimation processing on the first video in response to the first input, to obtain a depth information map and a segmentation information map of the first video; A second processing module, configured to perform blur processing on the first video, the depth information map, and the segmentation information map to obtain a blur-processed second video; Wherein, when the first input is a recording operation, the device is further used to save the second video; or, When the first input is a play operation or a share operation, the first video is obtained by recording the third video.
7. The device according to claim 6, wherein: The second processing module comprises: A first processing unit, configured to perform blur processing on the first video, the depth information map, and the segmentation information map to obtain a first blur video; A generating unit is used to generate the second video based on the first video, the depth information map, the segmentation information map and the first blurred video.
8. The device according to claim 7, wherein: The generating unit is further configured to: Encoding the first video, the depth information map, the segmentation information map and the first defocused video respectively to obtain a first video bitstream, an image depth bitstream, an image segmentation bitstream and a defocused video bitstream; The second video is generated according to the first video code stream, the image depth code stream, the image segmentation code stream and the virtualized video code stream.
9. The device according to any one of claims 6 to 8, wherein: The first processing module is also used for: Performing video size compression processing on the first video; Depth estimation is performed on the compressed first video.
10. The device according to claim 7, wherein: The second processing module is also used for: Performing blur processing on the first video, the depth information map, and the segmentation information map to obtain a first blur video; Generate a virtualized video code stream according to the first virtualized video; The second video is generated based on the virtualized video code stream.
11. An electronic device, comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the video blur processing method according to any one of claims 1 to 5 are implemented.
12. A readable storage medium storing a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the video blur processing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Video recording method and device
CN105049695A
Monocular depth estimation method
CN110060286A
Target object blurring method and device, storage medium and electronic equipment
CN114372931A
Image processing method and device, equipment, processor and medium
CN115272049A
Image background blurring method, electronic equipment, storage medium and program product
CN116051363A