Video processing method and device
By grouping average value stacking and splicing of video frames of electronic devices, the problem of insufficient shutter angle in the bright environment is solved, achieving smoother video effects and simplifying device operation.
Patent Information
- Application Number
- CN202211701993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-12-28
AI Technical Summary
When using electronic devices to shoot videos in a bright environment, the shutter angle is too small to cause the video picture to lack motion blur, affecting the picture fluency, and cannot be solved through external filters and increase the complexity and weight of the equipment.
Group image frames in the video for average stack processing and stitching, reducing the number of image frames to reduce the frame rate, thereby increasing the shutter angle and achieving a more blurred video effect.
Without reducing video content, by reducing the frame rate, increasing the shutter angle, improving the motion blur of the video, improving picture fluency, simplifying device operation and maintaining portability.
Smart Images

Figure CN115967863B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electronic technology, and specifically relates to a video processing method and device thereof. Background Art
[0002] Video shooting has become an increasingly used function in electronic device shooting. When electronic devices record videos in bright environments (such as midday sunlight), the shutter angle is too small, resulting in each frame being very solid and lacking comfortable motion blur, which makes the picture feel choppy.
[0003] Typically, users use professional equipment to shoot professional videos in bright environments, and generally use an external neutral density filter to reduce the amount of light entering the picture, thereby extending the exposure time, achieving a high shutter angle, and obtaining a smoother motion blur effect.
[0004] Therefore, how to ensure the motion blur in the video content when shooting with an electronic device so as to make the video picture smoother is an urgent problem to be solved. Summary of the Invention
[0005] The purpose of the embodiments of the present application is to provide a video processing method and device thereof, which can solve the problem of ensuring motion blur in video content when shooting using an electronic device, thereby making the video picture smoother.
[0006] In a first aspect, an embodiment of the present application provides a video processing method, which includes: obtaining a first video; grouping image frames in the first video to obtain M groups of image frames, where M is a positive integer; performing average value stack processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; and splicing the first target image frames corresponding to each group of image frames to obtain a second video.
[0007] In second aspect, an embodiment of the present application provides a video processing device, which includes: an acquisition module and a processing module; the acquisition module is used to acquire a first video; the processing module is used to group the image frames in the first video to obtain M groups of image frames, where M is a positive integer; the processing module is also used to perform average value stack processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; the processing module is also used to splice the first target image frames corresponding to each group of image frames to obtain a second video.
[0008] 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 of the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.
[0010] 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 of the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.
[0012] In an embodiment of the present application, a first video is acquired; image frames in the first video are grouped to obtain M groups of image frames, where M is a positive integer; an average stacking process is performed on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; and the first target image frames corresponding to each group of image frames are spliced to obtain a second video. In this manner, the electronic device performs an average stacking process on the image frames in the acquired video to fuse multiple image frames into a single image frame, thereby reducing the number of image frames without reducing the video content, thereby reducing the image frame rate, thereby increasing the shutter angle and obtaining a more blurred video. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 This is a flow chart of a video processing method provided in an embodiment of the present application;
[0014] Figure 2 This is a schematic diagram of a grouping method of a video processing method provided in an embodiment of the present application;
[0015] Figure 3 This is one of the structural diagrams of a video processing device provided in an embodiment of the present application;
[0016] Figure 4 This is a second structural diagram of a video processing device provided in an embodiment of the present application;
[0017] Figure 5 This is a third structural diagram of a video processing device provided in an embodiment of the present application;
[0018] Figure 6 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;
[0019] Figure 7 This is the second hardware structure diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] 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.
[0021] 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.
[0022] The video processing method and apparatus provided by the embodiments of the present application are described in detail below with reference to specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0023] Video shooting has become an increasingly used function in electronic device shooting. When electronic devices record videos in bright environments (such as midday sunlight), the shutter angle is too small, resulting in each frame being very solid and lacking comfortable motion blur, which makes the picture feel choppy.
[0024] Typically, users use professional photography equipment to shoot professional videos in bright environments. They generally use an external neutral density filter to reduce the amount of light entering the picture, thereby extending the exposure time, achieving a high shutter angle, and obtaining a smoother motion blur effect.
[0025] However, when shooting with electronic devices, due to the excessive amount of light entering in bright environments, it is impossible to use a large shutter angle to shoot directly with the electronic device. Although professional photographers can currently achieve the same goal by using professional photographic equipment to connect ND filters, the lack of professional universal filter interfaces in electronic devices requires customized or manually manufactured accessories, which is relatively complex to implement, increases the weight and size of the electronic device, reduces the convenience of the electronic device as a shooting tool, and electronic devices of different models and appearances cannot reuse the same interface.
[0026] As a result, it is impossible to use the electronic device to shoot a video with a high shutter angle in a bright environment, resulting in a low sense of motion blur in the video shot by the electronic device.
[0027] To address the above-mentioned issues, in the video processing method and apparatus provided in the embodiments of the present application, an electronic device acquires a first video; groups multiple image frames in the first video to obtain M groups of image frames, where M is a positive integer; performs an average stacking process on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; and splices the first target image frames corresponding to each group of image frames to obtain a second video. In this way, the electronic device performs an average stacking process on the image frames in the acquired video to fuse multiple image frames into a single image frame, thereby reducing the number of image frames without reducing the video content, thereby reducing the image frame rate, thereby increasing the shutter angle and obtaining a more blurred video.
[0028] The embodiment of the present application provides a video processing method, Figure 1 FIG. 1 shows a flow chart of a video processing method provided by an embodiment of the present application, which can be applied to electronic devices. Figure 1 As shown, the video processing method provided in the embodiment of the present application may include the following steps 201 to 204.
[0029] Step 201: The electronic device obtains a first video.
[0030] In an embodiment of the present application, the first video may be a video shot by the electronic device, or a video already stored in the electronic device.
[0031] Step 202: The electronic device groups the image frames in the first video to obtain M groups of image frames.
[0032] In the embodiment of the present application, each of the M groups of image frames includes at least one image frame, and M is a positive integer. It should be noted that the number of image frames in each group of image frames can be the same or different, and this embodiment of the present application does not limit this.
[0033] In an embodiment of the present application, when grouping multiple image frames, the electronic device groups the image frames containing the same or similar content in the first video into one group according to the time sequence of each image frame.
[0034] In one possible embodiment, the number M of groups of image frames in the first video may be user-defined or system-set. Thus, the electronic device may divide the image frames in the first video into M groups based on the user-defined or system-set number M of groups, and then process all image frames in each group.
[0035] In one possible embodiment, the number M of image frame groups in the first video may be determined according to the second frame rate. Thus, M groups of image frames may be obtained based on the second frame rate, and each of the M groups of image frames may be processed to obtain a video output at the second frame rate.
[0036] For example, Figure 2 As shown, taking the first video frame rate of 120 frames (fps) and containing 120 image frames as an example, the 120 image frames are grouped into groups of 4 image frames to obtain 30 groups of image frames, and all image frames in each group are processed.
[0037] For example, before the above step 201 “the electronic device obtains the first video”, the video processing method provided in the embodiment of the present application further includes the following step 301:
[0038] Step 301: The electronic device records the first video at a first frame rate.
[0039] Exemplarily, the first frame rate may be set by a user or customized by the system.
[0040] Further, optionally, in combination with step 301, the process of step 202 "the electronic device groups the image frames in the first video to obtain M groups of image frames" includes the following steps 202a:
[0041] Step 202a: The electronic device groups the image frames according to the second frame rate to obtain M groups of image frames.
[0042] Exemplarily, the second frame rate is lower than the first frame rate.
[0043] Exemplarily, the number M of image frames in the first video is calculated based on the second frame rate. In one example, the number M of image frames in the first video is the same as the value of the second frame rate. For example, if the second frame rate is 30 fps, the image frames in the first video are divided into 30 groups, each corresponding to 1 fps.
[0044] In this way, the electronic device can obtain a video output at the second frame rate after processing the grouped multiple image frames separately.
[0045] Step 203 : The electronic device performs average value stacking processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames.
[0046] In an embodiment of the present application, the electronic device performs average value stacking processing on each group of image frames in the above-mentioned M groups of image frames respectively, thereby obtaining the first target image frame corresponding to each group of image frames. That is, after the average value stacking processing, M frames of first target image frames can be obtained, thereby reducing the number of image frames to achieve the effect of lowering the frame rate.
[0047] In the embodiment of the present application, the above-mentioned average value stacking refers to calculating the average of non-transparent pixels of all image frames. Generally, performing the average value stacking process can achieve the effect of integrating all contents of multiple image frames into a single image frame without affecting the image quality of the image frames.
[0048] In an embodiment of the present application, when the electronic device performs average value stack processing on each group of image frames in the above-mentioned M groups of image frames, it can be processed in parallel or in series.
[0049] It should be noted that the electronic device combines a group of similar image frames but actually has different quality or content, and after the combination, performs average value stacking processing on them to generate a composite image frame view, thereby eliminating unnecessary content or noise in this group of image frames.
[0050] Step 204: The electronic device splices the first target image frames corresponding to each group of image frames to obtain a second video.
[0051] In an embodiment of the present application, the electronic device combines the first target image frames corresponding to each group of image frames in a time sequence corresponding to the timestamps of each first target image frame to obtain a second video.
[0052] In the embodiment of the present application, taking a group of image frames in the aforementioned M groups of image frames as an example, each image frame in the group of image frames corresponds to a timestamp, and the electronic device may use the timestamp corresponding to the last image frame in the group of image frames as the timestamp of the first target image frame corresponding to the group of image frames. It should be noted that the last image frame in the aforementioned group of image frames is the image frame with the latest timestamp in the group of image frames.
[0053] In the video processing method provided in an embodiment of the present application, a first video is acquired; image frames in the first video are grouped to obtain M groups of image frames, where M is a positive integer; an average stacking process is performed on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; and the first target image frames corresponding to each group of image frames are spliced to obtain a second video. In this manner, the electronic device performs an average stacking process on the image frames in the acquired video to fuse multiple image frames into a single image frame, thereby reducing the number of image frames without reducing the video content, thereby reducing the image frame rate, thereby increasing the shutter angle and obtaining a more blurred video.
[0054] Optionally, in the embodiment of the present application, in the process of step 203 “the electronic device performs average value stacking processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames”, the following steps 401 to 403 are included:
[0055] Step 401: The electronic device adjusts the transparency of all image frames in each group of image frames to a target transparency.
[0056] For example, the target transparency may be user-defined or determined by the system based on the number of image frames in each group of image frames.
[0057] For example, assuming that a certain group of image frames in the M groups of image frames includes N image frames, the target transparency can be set to the average transparency of the N image frames, such as, That is, the transparency of N frames in a group of image frames is adjusted to
[0058] For example, assuming that a group of image frames includes 4 image frames, the transparency of each image frame is adjusted to 25%.
[0059] Step 402: The electronic device superimposes all the adjusted image frames in each group of image frames to obtain a second target image frame corresponding to each group of image frames.
[0060] Exemplarily, after all image frames in each group of image frames are adjusted to the target transparency, the image frames are superimposed in the order of the timestamps of each image frame, for example, from the earliest to the latest, to obtain the second target image frame.
[0061] Step 403: The electronic device adjusts the second target image frame based on the image information of the target image frame corresponding to each group of image frames to obtain the first target image frame.
[0062] Exemplarily, the above-mentioned target image frame image information is calculated based on: image frame image information corresponding to each image frame in a group of image frames.
[0063] Exemplarily, the above-mentioned image frame image information may include parameters such as brightness of the image frame, saturation of the image frame, and granularity of the image frame.
[0064] In one example, the average values of various parameters of the image frame image information of each image frame in each group of image frames are calculated to finally obtain the target image frame image information.
[0065] For example, suppose a set of image frames includes four frames. For a point at the same position in each frame, the brightness parameter values in the image information of the frame are 10, 20, 30, and 40 respectively. The electronic device stacks these four frames and calculates the average value. That is, in the final composite image frame, the brightness of this point is: (10 + 20 + 30 + 40) / 4 = 25. The calculation result is an average value.
[0066] It should be noted that after the transparency of multiple image frames in each group of image frames is adjusted to the target transparency, the multiple image frames in each group of image frames are superimposed to obtain the above-mentioned first target image frame.
[0067] In this way, electronic devices can adjust the transparency of multiple image frames and superimpose them into one image frame to reduce the number of image frames, thereby reducing the frame rate of the video. Then, by calculating and adjusting the image information of the image frames, the image quality of the superimposed image frames can be optimized to eliminate unnecessary content or noise and improve the video picture quality.
[0068] Optionally, in the embodiment of the present application, before the above step 202a "the electronic device groups the above image frames according to the second frame rate to obtain M groups of image frames", the video processing method provided in the embodiment of the present application further includes the following steps 501 and 502:
[0069] Step 501: The electronic device receives a first input.
[0070] Step 502: The electronic device determines a second frame rate in response to the first input according to the adjusted shutter angle.
[0071] Exemplarily, the first input is used to adjust a shutter angle.
[0072] For example, different frame rates may correspond to different shutter angles. When the frame rate is reduced, a video with a sense of picture flow may be obtained by increasing the shutter angle.
[0073] Exemplarily, the first input may include: a user's touch input to the display screen, or a voice command input by the user, or a specific gesture input by the user. The specific input may be determined based on actual usage requirements and is not limited in the embodiment of the present invention.
[0074] Exemplarily, the touch input includes dragging, sliding, and clicking on the display screen by the user. The specific gesture in the embodiments of the present invention may be any one of a single-click gesture, a sliding gesture, a pressure recognition gesture, a long-press gesture, an area change gesture, a double-press gesture, and a double-click gesture. The click input in the embodiments of the present invention may be a single-click input, a double-click input, or any number of click inputs. The click input may also be a long-press input or a short-press input.
[0075] Exemplarily, the first frame rate corresponds to a first shutter angle.
[0076] Exemplarily, the second frame rate corresponds to the adjusted shutter angle.
[0077] Exemplarily, the adjusted shutter angle is greater than the first shutter angle.
[0078] In one example, the second frame rate is set by the user.
[0079] It should be noted that when recording video, a high frame rate of 120fps is used, and there are 120 continuous images per second. However, the shutter angle is relatively small. For example, the exposure time can only be 1 / 480s. If you want to output a 30fps video, the corresponding shutter angle is 22.5° (360° / (480 / 30)=22.5°). When the shutter angle is lower than 180°, it will give people a discontinuous feeling. Therefore, you need to adjust the shutter angle to obtain a video with a larger shutter angle.
[0080] For example, after an electronic device records a video at a high frame rate of 120fps, if the user wishes to output the recorded video at a frame rate of 30fps, the electronic device displays the video recording interface and then adjusts the camera's shutter angle to 90° within that interface. Based on the adjusted shutter angle and the user's desired frame rate of 30fps, the electronic device then groups the recorded video frames into 30 groups. It then performs an average stacking process on each group of image frames, resulting in 30 processed frames. Finally, the electronic device combines these 30 processed frames to produce a video that retains motion blur without compromising image quality.
[0081] In this way, the shutter angle can be increased by reducing the frame rate, so that the video output by the electronic device has a sense of motion blur.
[0082] Optionally, in the embodiment of the present application, before the above step 204 of "the electronic device splices the first target image frames corresponding to each group of image frames to obtain a second video", the video processing method provided in the embodiment of the present application further includes the following step 601:
[0083] Step 601: The electronic device modifies the frame rate of the timeline where the first target image frame corresponding to each group of image frames is located to a second frame rate, and keeps the time rate of the second video unchanged.
[0084] Exemplarily, after the image frames in each group of image frames are merged, frame rate remapping is performed to convert the video at the first frame rate into the video at the second frame rate.
[0085] Specifically, all the image frame images in each group of image frames are stacked on average and synthesized into a frame of image frames, so that the low shutter angle picture of the first frame rate is converted into a high shutter angle picture of the second frame rate. The frame rate of the timeline is then modified to the second frame rate, and the time rate is kept unchanged. The image frame rate can be converted to the second frame rate, but the picture effect is the same at the same speed.
[0086] In this way, the video can appear smoother and meet user needs. Compared with reducing the frame rate by extracting frames, this application not only increases the shutter angle while increasing the image frame rate, but also ensures that the video smoothness will not be reduced.
[0087] In addition, the video processing method provided in the embodiment of the present application can also be applied to the case of time-lapse photography of electronic devices. Usually, time-lapse photography often has a longer interval between each two frames, such as an interval of 10s, 15s, etc., and requires a very long exposure time to obtain a 180° shutter angle (such as an interval of 10s, then the exposure time requires 5s). For electronic devices, using continuous high frame rate shooting and stacking fusion can obtain a smoother light and shadow change performance in time-lapse photography.
[0088] It should be noted that the video processing method provided in the embodiments of the present application can be executed by a video processing device, an electronic device, or a functional module or entity in the electronic device. In the embodiments of the present application, the video processing device provided in the embodiments of the present application is described by taking the video processing method executed by the video processing device as an example.
[0089] Figure 3 FIG. 1 shows a possible structural diagram of a video processing device involved in an embodiment of the present application. Figure 3 As shown, the apparatus 700 may include: an acquisition module 701 and a processing module 702;
[0090] Among them, the acquisition module 701 is used to acquire the first video; the processing module 702 is used to group the image frames in the first video to obtain M groups of image frames, where M is a positive integer; the processing module 702 is also used to perform average value stack processing on each group of image frames in the M groups of image frames to obtain the first target image frame corresponding to each group of image frames; the processing module 702 is also used to splice the first target image frame corresponding to each group of image frames to obtain the second video.
[0091] Optionally, in an embodiment of the present application, the above-mentioned processing module 702 is specifically used to: adjust the transparency of all image frames in each group of image frames to the target transparency; superimpose all the adjusted image frames in each group of image frames to obtain a second target image frame corresponding to each group of image frames; and adjust the second target image frame based on the image information of the target image frame corresponding to each group of image frames to obtain the first target image frame.
[0092] Optionally, in the embodiment of the present application, combined with Figure 3 ,like Figure 4 As shown, the above-mentioned device 700 also includes: a recording module 703; the recording module 703 is used to record the first video at a first frame rate; the above-mentioned processing module 702 is specifically used to group the image frames according to the second frame rate to obtain M groups of image frames; wherein the second frame rate is less than the first frame rate.
[0093] Optionally, in the embodiment of the present application, the first frame rate corresponds to the first shutter angle; Figure 3 ,like Figure 5 As shown, the above-mentioned device 700 also includes: a receiving module 704 and a determining module 705; the receiving module 704 is used to receive a first input, and the first input received by the receiving module is used to adjust the shutter angle; the determining module 705 is used to determine the second frame rate in response to the first input received by the receiving module according to the adjusted shutter angle, and the adjusted shutter angle is greater than the first shutter angle.
[0094] Optionally, in an embodiment of the present application, the processing module 702 is further configured to modify the frame rate of the timeline of the first target image frame corresponding to each group of image frames to a second frame rate, and keep the time rate of the second video unchanged.
[0095] In the video processing device provided in an embodiment of the present application, the device acquires a first video; groups image frames in the first video to obtain M groups of image frames, where M is a positive integer; performs an average stacking process on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; and splices the first target image frames corresponding to each group of image frames to obtain a second video. In this way, the electronic device performs an average stacking process on the image frames in the acquired video to fuse multiple image frames into a single image frame, thereby reducing the number of image frames without reducing the video content, thereby reducing the image frame rate, thereby increasing the shutter angle and obtaining a more blurred video.
[0096] The video 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 a chip. The electronic device can be a terminal or a 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.
[0097] The video processing device in the embodiment of the present application may be a device having an operating system. The operating system may 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.
[0098] The video processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0099] Alternatively, as Figure 6As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801 and a memory 802, wherein the memory 802 stores a program or instruction that can be run on the processor 801, and when the program or instruction is executed by the processor 801, the various steps of the above-mentioned video processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0100] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0101] Figure 7 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
[0102] The electronic device 100 includes but is not limited to components such as a radio frequency unit 101 , a network module 102 , an audio output unit 103 , an input unit 104 , a sensor 105 , a display unit 106 , a user input unit 107 , an interface unit 108 , a memory 109 , and a processor 110 .
[0103] Those skilled in the art will understand that the electronic device 100 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 110 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.
[0104] Among them, the input unit 104 is used to obtain the first video; the processor 110 is used to group the image frames in the first video to obtain M groups of image frames, where M is a positive integer; the processor 110 is also used to perform average value stack processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; the processor 110 is also used to splice the first target image frames corresponding to each group of image frames to obtain a second video.
[0105] Optionally, in an embodiment of the present application, the above-mentioned processor 110 is specifically used to: adjust the transparency of all image frames in each group of image frames to the target transparency; superimpose all the adjusted image frames in each group of image frames to obtain a second target image frame corresponding to each group of image frames; and adjust the second target image frame based on the image information of the target image frame corresponding to each group of image frames to obtain the first target image frame.
[0106] Optionally, in an embodiment of the present application, the above-mentioned input module 104 is also used to record the first video at a first frame rate; the above-mentioned processor 110 is specifically used to group the image frames according to the second frame rate to obtain M groups of image frames; wherein the second frame rate is less than the first frame rate.
[0107] Optionally, in an embodiment of the present application, the above-mentioned first frame rate corresponds to a first shutter angle; the user input unit 107 is used to receive a first input, and the first input received by the receiving module is used to adjust the shutter angle; the processor 110 is also used to respond to the first input received by the receiving module and determine the second frame rate according to the adjusted shutter angle, and the adjusted shutter angle is greater than the first shutter angle.
[0108] Optionally, in an embodiment of the present application, the processor 110 is further configured to modify the frame rate of the timeline of the first target image frame corresponding to each group of image frames to a second frame rate, and keep the time rate of the second video unchanged.
[0109] In an electronic device provided in an embodiment of the present application, the electronic device acquires a first video; groups image frames in the first video to obtain M groups of image frames, where M is a positive integer; performs an average stacking process on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; and splices the first target image frames corresponding to each group of image frames to obtain a second video. In this manner, the electronic device performs an average stacking process on the image frames in the acquired video to fuse multiple image frames into a single image frame, thereby reducing the number of image frames without reducing the video content, thereby reducing the image frame rate, thereby increasing the shutter angle and obtaining a more blurred video.
[0110] It should be understood that in an embodiment of the present application, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042, and the graphics processor 1041 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 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 107 includes a touch panel 1071 and at least one of other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Other input devices 1072 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.
[0111] The memory 109 can be used to store software programs and various data. The memory 109 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 109 may include a volatile memory or a non-volatile memory, or the memory 109 may include both volatile and non-volatile memories. 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 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0112] Processor 110 may include one or more processing units. Optionally, processor 110 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 110.
[0113] 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 processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0114] The processor is the processor in the electronic device 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.
[0115] An embodiment of the present application further 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 various processes of the above-mentioned video processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0116] 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.
[0117] 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 processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0118] 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.
[0119] 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, 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), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0120] 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 processing method, characterized in that: The method comprises: Get the first video; Grouping the image frames in the first video to obtain M groups of image frames, where M is a positive integer; Performing average value stacking processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames; splicing the first target image frames corresponding to each group of image frames to obtain a second video; The step of performing average value stacking processing on each group of image frames in the M groups of image frames to obtain a first target image frame corresponding to each group of image frames includes: Adjusting the transparency of all image frames in each group of image frames to a target transparency; superimposing all the adjusted image frames in each group of image frames to obtain a second target image frame corresponding to each group of image frames; Based on the image information of the target image frame corresponding to each group of image frames, the second target image frame is adjusted to obtain the first target image frame.
2. The method according to claim 1, characterized in that Before obtaining the first video, the method further includes: recording the first video at a first frame rate; The image frames are grouped to obtain M groups of image frames, including: Grouping the image frames according to a second frame rate to obtain M groups of image frames; The second frame rate is lower than the first frame rate.
3. The method according to claim 2, characterized in that The first frame rate corresponds to a first shutter angle; before grouping the image frames according to the second frame rate to obtain M groups of image frames, the method further includes: receiving a first input for adjusting a shutter angle; In response to the first input, the second frame rate is determined according to an adjusted shutter angle, the adjusted shutter angle being greater than the first shutter angle.
4. The method according to claim 2 or 3, characterized in that Before combining the first target image frames corresponding to each group of image frames to obtain the second video, the method further includes: The frame rate of the timeline where the first target image frame corresponding to each group of image frames is located is modified to the second frame rate, and the time rate of the second video is kept unchanged.
5. A video processing device, characterized in that: The video processing device includes: an acquisition module and a processing module; The acquisition module is used to acquire the first video; The processing module is configured to group the image frames in the first video to obtain M groups of image frames, where M is a positive integer; The processing module is further configured to perform average value stacking processing on each group of the M groups of image frames acquired by the acquisition module to obtain a first target image frame corresponding to each group of image frames; The processing module is further configured to splice the first target image frames corresponding to each group of image frames to obtain a second video; The processing module is specifically used to: Adjusting the transparency of all image frames in each group of image frames to a target transparency; superimposing all the adjusted image frames in each group of image frames to obtain a second target image frame corresponding to each group of image frames; Based on the image information of the target image frame corresponding to each group of image frames, the second target image frame is adjusted to obtain the first target image frame.
6. The device according to claim 5, characterized in that The device further comprises: a recording module; The recording module is configured to record the first video at a first frame rate; The processing module is specifically configured to group the image frames according to a second frame rate to obtain M groups of image frames; The second frame rate is lower than the first frame rate.
7. The device according to claim 6, characterized in that The first frame rate corresponds to a first shutter angle; the device further comprises: a receiving module and a determining module; The receiving module is configured to receive a first input, wherein the first input received by the receiving module is used to adjust a shutter angle; The determining module is configured to determine the second frame rate in response to the first input received by the receiving module according to an adjusted shutter angle, where the adjusted shutter angle is greater than the first shutter angle.
8. The device according to claim 6 or 7, characterized in that The processing module is further configured to modify the frame rate of the timeline where the first target image frame corresponding to each group of image frames is located to the second frame rate, and to keep the time rate of the second video unchanged.
Citation Information
Patent Citations
Image processing device and image processing method
US20210358073A1