Video processing method, photographing device and image processing device
In the time-lapse photography video processing method, the target area of the video frame is determined according to the target mirror mode and the target video is generated, the problem of poor display effect of time-lapse photography video is solved, and more dynamic and vivid video effects are achieved.
Patent Information
- Application Number
- PCT/CN2023/132682
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-11-20
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the display effect of time-lapse photography video is poor, mainly due to the shooting of a fixed viewing angle, the video picture is too fixed and the effect of lens movement is lacking.
Through a video processing method, the video frames to be processed are obtained, and the target area of each video frame to be processed is confirmed according to the target mirror mode. The method includes obtaining a video frame to be processed, determining a target area of the video frame to be processed according to the target mirror mode, and generating a target video according to the picture of the target area, wherein the target area of the at least one frame of the video frame to be processed is a local area.
The introduction of the mirror effect in time-lapse photography videos is achieved, which improves the display effect of the video, making the video more dynamic and vivid.
Smart Images

Figure CN2023132682_30052025_PF_FP_ABST
Abstract
Description
Video processing method, shooting device and image processing device Technical Field
[0001] The present application relates to the field of video processing technology, and in particular to a video processing method, a shooting device, and an image processing device. Background Art
[0002] When recording videos, professionals use a variety of camera techniques to achieve the desired effect, which depends on the professional level of the professional and the level of equipment.
[0003] Current cameras, such as action cameras, often shoot from a fixed perspective, position, or orientation, or are worn by the user. Consequently, the resulting video display quality is poor. Take time-lapse photography, for example. This technology can capture content captured over a longer period of time and play it back as a video in a shorter timeframe. However, this technology also requires long-term filming, such as 12 or 24 hours. Consequently, these cameras typically use a fixed perspective, resulting in a static video image and poor display quality.
[0004] Summary of the Invention
[0005] Based on this, it is necessary to provide a video processing method, shooting equipment and image processing equipment that can improve the display effect of time-lapse video in response to the above technical problems.
[0006] In a first aspect, the present application provides a video processing method, comprising:
[0007] Get the video frame to be processed;
[0008] Determining a target area of each of the to-be-processed video frames according to the target camera movement mode; and
[0009] A target video is obtained according to the images of the target area of each of the to-be-processed video frames, wherein the target area of at least one of the to-be-processed video frames is a local area.
[0010] In one embodiment, the video frame to be processed is captured by a shooting device under the condition that shooting conditions are met;
[0011] The shooting conditions include: the shooting device maintaining one or more combinations of a fixed position, a fixed orientation or a fixed viewing angle.
[0012] In one embodiment, the video to be processed corresponding to the video frame to be processed is a time-lapse video; and / or the target video is a time-lapse video.
[0013] In one embodiment, the target area of each of the to-be-processed video frames is a local area; and / or,
[0014] The target areas of at least three adjacent frames of the video frames to be processed have different sizes; and or,
[0015] The absolute positions of the target areas of at least three adjacent video frames to be processed are different.
[0016] In one embodiment, a target camera movement mode is selected from candidate camera movement modes according to a user operation on an interaction device.
[0017] In one embodiment, the camera movement mode includes:
[0018] One or more combinations of push mirror mode, pull mirror mode, pan mirror mode or pan mirror mode.
[0019] In one embodiment, the target camera movement pattern is such that:
[0020] The target areas of adjacent video frames to be processed move along a preset trajectory at a preset speed mode;
[0021] And / or, the sizes of the target areas of adjacent video frames to be processed vary in a preset size pattern.
[0022] In one embodiment, the target area of each adjacent video frame to be processed moves along a preset trajectory at a preset speed mode, including:
[0023] The target areas of adjacent video frames to be processed move along a first direction at a preset speed mode;
[0024] The first direction includes: a horizontal direction, a vertical direction or an inclined direction.
[0025] In one embodiment, the preset speed mode includes:
[0026] During the first time period, the speed changes linearly; and / or,
[0027] The speed average value in the second time period is different from the speed average value in the third time period, wherein the second time period and the third time period are continuous in time, the speed is constant in the second time period, and the speed is constant in the third time period.
[0028] In one embodiment, the target camera movement pattern is such that:
[0029] In the fourth time period, the change of the relative position of the target area of each of the to-be-processed video frames presents one or more combinations of linear, slow in and fast out, fast in and slow out, slow first, fast then slow.
[0030] In one embodiment, the sizes of the target areas of the adjacent video frames to be processed are changed in a preset size pattern, including:
[0031] During the fifth preset time, the sizes of the target areas of the adjacent video frames to be processed are linearly increased or decreased.
[0032] In one embodiment, the sizes of the target areas of the adjacent video frames to be processed are changed in a preset size pattern, including:
[0033] During the sixth preset time, the sizes of the target areas of the adjacent to-be-processed video frames increase or decrease nonlinearly.
[0034] In one embodiment, determining the target area of each to-be-processed video frame according to the target camera movement mode includes:
[0035] Obtain at least two key locations and corresponding target area information;
[0036] According to the interpolation mode and the target area information of the key positions, the target area information of each of the to-be-processed video frames between the two key positions is determined; the interpolation mode corresponds to the target camera movement mode.
[0037] In one embodiment, the interpolation mode includes one or more combinations of the following modes:
[0038] Linear zoom interpolation mode, nonlinear zoom interpolation mode, linear zoom interpolation mode, nonlinear zoom interpolation mode, linear translation interpolation mode, nonlinear translation interpolation mode, linear rotation interpolation mode, nonlinear rotation interpolation mode.
[0039] In one embodiment, obtaining target area information of at least two key locations includes:
[0040] Get the target template file;
[0041] Based on the target template file, the key position and corresponding target area information are obtained.
[0042] In one embodiment, the method further comprises:
[0043] Based on the target template file, the interpolation mode is obtained.
[0044] In one embodiment, obtaining the target template file includes one of the following methods:
[0045] selecting the target template file from candidate template files based on the user's operation on the interactive device;
[0046] Selecting the target template file from candidate template files based on content information of at least one frame of the video frame to be processed;
[0047] Respond to template file editing operations and generate target template files.
[0048] In one embodiment, obtaining the target video according to the image of the target area of each video frame to be processed includes:
[0049] Rendering a corresponding target video frame according to the pixels of the target area of each of the to-be-processed video frames;
[0050] The target video is obtained according to each of the target video frames.
[0051] In one embodiment, rendering the corresponding target video frame according to the pixels of the target area of each of the to-be-processed video frames includes:
[0052] Performing interpolation processing on pixel values of a target area of the video frame to be processed to obtain interpolated pixel values;
[0053] Render the corresponding target video frame according to the interpolated pixel value.
[0054] In one embodiment, the obtaining of the video frame to be processed,
[0055] The process includes decoding the video to be processed to obtain the video frame to be processed.
[0056] In a second aspect, the present application further provides a photographing device, comprising:
[0057] A camera is configured to capture video frames to be processed;
[0058] a memory storing a computer program;
[0059] A processor is connected to the camera and the memory respectively, and when the processor executes the computer program, the processor is configured to:
[0060] Determining a target area of each of the to-be-processed video frames according to the target camera movement mode; and
[0061] A target video is obtained according to the images of the target area of each of the to-be-processed video frames; wherein the target area of at least one of the to-be-processed video frames is a local area.
[0062] In one embodiment, the video frame to be processed is captured by a shooting device under the condition that shooting conditions are met;
[0063] The shooting conditions include: the shooting device maintaining one or more combinations of a fixed position, a fixed orientation or a fixed viewing angle.
[0064] In one embodiment, the photographing device includes an interaction device connected to the processor; the processor is configured to:
[0065] According to the user's operation on the interactive device, the camera is controlled to record the video to be processed, and the video to be processed is a time-lapse video.
[0066] In one embodiment, the target video is a time-lapse video.
[0067] In one embodiment, when the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode;
[0068] The target area of each of the to-be-processed video frames is a local area; and / or,
[0069] The target areas of at least three adjacent frames of the video frames to be processed have different sizes; and or,
[0070] The absolute positions of the target areas of at least three adjacent video frames to be processed are different.
[0071] In one embodiment, the photographing device includes an interaction device connected to the processor; the processor is configured to:
[0072] According to the user's operation on the interaction device, a target camera movement mode is selected from the candidate camera movement modes.
[0073] In one embodiment, the target mirror movement mode includes: one or more combinations of a push mirror movement mode, a pull mirror movement mode, a shake mirror movement mode or a shift mirror movement mode.
[0074] In one embodiment, when the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to: move the target areas of adjacent to-be-processed video frames along a preset trajectory at a preset speed mode.
[0075] In one embodiment, when the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to change the size of the target area of each adjacent to-be-processed video frame in a preset size mode.
[0076] In one embodiment, when the processor causes the target areas of adjacent video frames to be processed to move along a preset trajectory at a preset speed mode, the processor is configured to: cause the target areas of adjacent video frames to be processed to move along a first direction at a preset speed mode; the first direction includes: a horizontal direction, a vertical direction, or an inclined direction.
[0077] In one embodiment, the preset speed mode includes:
[0078] During the first time period, the speed changes linearly; and / or, the average speed during the second time period is different from the average speed during the third time period, the second time period and the third time period are continuous in time, the speed is constant during the second time period, and the speed is constant during the third time period.
[0079] In one embodiment, when the processor determines the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to:
[0080] In the fourth time period, the change of the relative position of the target area of each of the to-be-processed video frames is made to present one or more combinations of linearity, slow in and fast out, fast in and slow out, or slow first, fast then slow.
[0081] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size mode, the processor is configured to:
[0082] During the fifth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are linearly increased or decreased.
[0083] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size mode, the processor is configured to:
[0084] During the sixth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are nonlinearly increased or decreased.
[0085] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to:
[0086] Obtain at least two key locations and corresponding target area information;
[0087] According to the interpolation mode and the target area information of the key positions, the target area information of each of the to-be-processed video frames between the two key positions is determined; the interpolation mode corresponds to the target camera movement mode.
[0088] In one embodiment, the interpolation mode includes one or more combinations of the following modes:
[0089] Linear zoom interpolation mode, nonlinear zoom interpolation mode, linear zoom interpolation mode, nonlinear zoom interpolation mode, linear translation interpolation mode, nonlinear translation interpolation mode, linear rotation interpolation mode, nonlinear rotation interpolation mode.
[0090] In one embodiment, when the processor obtains target area information of at least two key locations, the processor is configured to:
[0091] Get the target template file;
[0092] Based on the target template file, the key position and corresponding target area information are obtained.
[0093] In one embodiment, the processor is further configured to:
[0094] Based on the target template file, the interpolation mode is obtained.
[0095] In one embodiment, when the processor obtains the target template file, the processor is configured to:
[0096] selecting the target template file from candidate template files based on the user's operation on the interactive device;
[0097] and / or, selecting the target template file from candidate template files based on content information of at least one frame of the video frame to be processed;
[0098] And / or, in response to a template file editing operation, a target template file is generated.
[0099] In one embodiment, when the processor obtains the target video according to the image of the target area of each video frame to be processed, the processor is configured to:
[0100] Rendering a corresponding target video frame according to the pixels of the target area of each of the to-be-processed video frames;
[0101] The target video is obtained according to each of the target video frames.
[0102] In one embodiment, when the processor renders the corresponding target video frame according to the pixels of the target area of each of the to-be-processed video frames, the processor is configured to:
[0103] Performing interpolation processing on pixel values of a target area of the video frame to be processed to obtain interpolated pixel values;
[0104] Render the corresponding target video frame according to the interpolated pixel value.
[0105] In one embodiment, the field of view of the camera is greater than 120 degrees; the shooting device further includes a display screen, the display screen is connected to the processor, and the processor is further configured to:
[0106] Control the display screen to preview or play the target video.
[0107] In a third aspect, the present application further provides an image processing device, comprising:
[0108] A communication component is used to communicate with an external device to obtain a video to be processed, wherein the video to be processed includes multiple frames of video to be processed;
[0109] a memory storing a computer program;
[0110] a processor, connected to the communication component and the memory, respectively, and when the processor executes the computer program, the processor is configured to:
[0111] Determining a target area of each of the to-be-processed video frames according to the target camera movement mode; and
[0112] A target video is obtained according to the images of the target area of each of the to-be-processed video frames; the target area of at least one of the to-be-processed video frames is a local area.
[0113] In one embodiment, the video frame to be processed is captured by a shooting device under the condition that shooting conditions are met;
[0114] The shooting conditions include: the shooting device maintaining one or more combinations of a fixed position, a fixed orientation or a fixed viewing angle.
[0115] In one embodiment, the video to be processed corresponding to the video frame to be processed is a time-lapse video; and / or, a time-lapse video of the target video.
[0116] In one embodiment, when the processor determines the target area of each video frame to be processed according to the target camera movement mode,
[0117] The target area of each of the to-be-processed video frames is a local area; and / or,
[0118] The target areas of at least three adjacent frames of the video frames to be processed have different sizes; and or,
[0119] The absolute positions of the target areas of at least three adjacent video frames to be processed are different.
[0120] In one embodiment, the image processing device includes an interaction device connected to the processor; the processor is configured to:
[0121] According to the user's operation on the interaction device, a target camera movement mode is selected from the candidate camera movement modes.
[0122] In one embodiment, the target camera movement mode includes:
[0123] One or more combinations of push mirror mode, pull mirror mode, pan mirror mode or pan mirror mode.
[0124] In one embodiment, when the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to move the target areas of adjacent to-be-processed video frames along a preset trajectory at a preset speed mode.
[0125] In one embodiment, when the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to change the size of the target area of each adjacent to-be-processed video frame in a preset size mode.
[0126] In one embodiment, when the processor causes the target areas of adjacent video frames to be processed to move along a preset trajectory at a preset speed mode, the processor is configured to cause the target areas of adjacent video frames to be processed to move along a first direction at a preset speed mode; the first direction includes: horizontal direction, vertical direction or inclined direction.
[0127] In one embodiment, the preset speed mode includes:
[0128] During the first time period, the speed changes linearly; and / or, the average speed during the second time period is different from the average speed during the third time period, the second time period and the third time period are continuous in time, the speed is constant during the second time period, and the speed is constant during the third time period.
[0129] In one embodiment, when the processor determines the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to:
[0130] In the fourth time period, the change of the relative position of the target area of each of the to-be-processed video frames is made to present one or more combinations of linearity, slow in and fast out, fast in and slow out, or slow first, fast then slow.
[0131] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size pattern, the processor is configured to:
[0132] During the fifth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are linearly increased or decreased.
[0133] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size pattern, the processor is configured to:
[0134] During the sixth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are nonlinearly increased or decreased.
[0135] In one embodiment, when the processor determines the target area of each video frame to be processed according to the target camera movement mode, the processor is configured to:
[0136] Obtain at least two key locations and corresponding target area information;
[0137] According to the interpolation mode and the target area information of the key positions, the target area information of each of the to-be-processed video frames between the two key positions is determined; the interpolation mode corresponds to the target camera movement mode.
[0138] In one embodiment, the interpolation mode includes one or more combinations of the following modes:
[0139] Linear zoom interpolation mode, nonlinear zoom interpolation mode, linear zoom interpolation mode, nonlinear zoom interpolation mode, linear translation interpolation mode, nonlinear translation interpolation mode, linear rotation interpolation mode, nonlinear rotation interpolation mode.
[0140] In one embodiment, when the processor obtains target area information of at least two key locations, the processor is configured to:
[0141] Get the target template file;
[0142] Based on the target template file, the key position and corresponding target area information are obtained.
[0143] In one embodiment, the processor is further configured to:
[0144] Based on the target template file, the interpolation mode is obtained.
[0145] In one embodiment, when the processor obtains the target template file, the processor is configured to:
[0146] selecting the target template file from candidate template files based on the user's operation on the interactive device;
[0147] and / or, selecting the target template file from candidate template files based on content information of at least one frame of the video frame to be processed;
[0148] And / or, in response to a template file editing operation, a target template file is generated.
[0149] In one embodiment, when the processor obtains the target video according to the image of the target area of each video frame to be processed, the processor is configured to:
[0150] Rendering a corresponding target video frame according to the pixels of the target area of each of the to-be-processed video frames;
[0151] The target video is obtained according to each of the target video frames.
[0152] In one embodiment, when the processor renders the corresponding target video frame according to the pixels of the target area of each of the to-be-processed video frames, the processor is configured to:
[0153] Performing interpolation processing on pixel values of a target area of the video frame to be processed to obtain interpolated pixel values;
[0154] Render the corresponding target video frame according to the interpolated pixel value.
[0155] In one embodiment, the processor is configured to:
[0156] After obtaining the video to be processed, the video to be processed is decoded to obtain a video frame to be processed.
[0157] In one embodiment, the image processing device includes a display screen connected to the processor, and the processor is further configured to:
[0158] Control the display screen to preview or play the target video.
[0159] The above-mentioned video processing method, shooting device, and image processing device obtain a video frame to be processed; determine a target area of each video frame to be processed according to a target camera movement pattern; and obtain a target video based on the image of the target area of each video frame to be processed, wherein the target area of at least one video frame to be processed is a local area. By processing the target area of the video frame to be processed into a target video frame according to the target camera movement pattern, the obtained target video can have a corresponding camera movement effect, thereby improving the display effect of the video. BRIEF DESCRIPTION OF THE DRAWINGS
[0160] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0161] FIG1 is a schematic flow chart of a video processing method according to an embodiment;
[0162] FIG2 is a schematic diagram of a push mirror process in one embodiment;
[0163] FIG3 is a schematic diagram of a moving mirror process in one embodiment;
[0164] FIG4 is a flow chart of a target area determination step in one embodiment. DETAILED DESCRIPTION
[0165] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0166] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.
[0167] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.
[0168] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0169] When recording videos, professionals use a variety of camera techniques to achieve the desired effect, which depends on the professional level of the professional and the level of equipment.
[0170] Current cameras, such as action cameras, often shoot from a fixed perspective, position, or orientation, or are worn by the user. Consequently, the resulting videos are often poorly displayed. Take time-lapse photography, for example. Time-lapse photography, also known as time-lapse photography, is a technique that compresses time. It captures a series of photos or videos, concatenating them, extracting frames from a video, or capturing them at intervals to compress a long process spanning minutes, hours, or even days into a short video. Using time-lapse photography can create bizarre and fascinating scenes that are normally invisible to the naked eye. Time-lapse photography allows content captured over a longer period to be played back in a shorter video format, but it also requires extended filming times, such as 12 or 24 hours. Therefore, it typically uses a fixed perspective, resulting in a relatively static video image. This creates a sense of time passing, without the illusion of camera movement, and results in poorly displayed videos.
[0171] The present application proposes a video processing method, which can be used to obtain time-lapse photography videos using a motion camera or a panoramic camera without the need for a gimbal, and ultimately achieve the effect of mobile time-lapse photography.
[0172] The implementation environment that may be involved in the video processing method of the embodiment of the present application will be briefly described.
[0173] In some embodiments, the video processing method provided in the embodiments of the present application can be applied to a shooting device, which may include a processor, a memory, and an optical module. The optical module collects the video frames to be processed, and then confirms the target area of each video frame to be processed according to the target camera movement mode; and obtains the target video based on the picture of the target area of each video frame to be processed, wherein the target area of at least one frame of the video frame to be processed is a local area.
[0174] In some embodiments, the video processing method of this embodiment can be applied to an image processing device, which may include a processor, a communication module, a memory storing an APP application, etc. The image processing device obtains the video to be processed from a camera, a storage device, a server, etc. through the communication module, decodes the video to be processed into video frames to be processed, identifies the target area of each video frame to be processed based on the target camera movement mode, and obtains the target video based on the image of the target area of each video frame to be processed.
[0175] In some embodiments, the video processing method provided by the embodiments of the present application can also be applied to an application environment including a shooting device and an image processing device. At this time, the shooting device is communicatively connected to the image processing device, and the shooting device shoots the video frames to be processed. The video frames to be processed can be transmitted to the image processing device by streaming. The image processing device can process the video frames to be processed while receiving them, that is, according to the target mirror movement mode, confirm the target area of each video frame to be processed; and, based on the picture of the target area of each video frame to be processed, obtain the target video.
[0176] In one embodiment, as shown in FIG1 , a video processing method is provided, which is described by taking the method applied to the above implementation environment as an example, including the following steps:
[0177] S201: Obtain a video frame to be processed.
[0178] The video to be processed may be a time-lapse video or a video captured using other photography modes, such as standard photography mode or HDR photography mode. Obtaining the video frames to be processed may involve decoding the video to be processed into frames or directly capturing the frames using a camera. The video to be processed may be a video shot at a fixed angle or a video shot at a non-fixed position, angle, or viewing angle.
[0179] S202: Determine the target area of each video frame to be processed according to the target camera movement mode.
[0180] It should be noted that, when the target area is a rectangle, the aspect ratio of the target area can be the same as the aspect ratio of the video frame to be processed, or the aspect ratio of the target area can be different from the aspect ratio of the video frame to be processed. Set it according to the actual ratio requirements. For example, the aspect ratio of the video frame to be processed is 4:3, and the aspect ratio of the target area is 1:1. In addition, the aspect ratio of the target video frame can be the same as or different from that of the target area. When the ratios of the two are different, it is only necessary to adjust the interpolation method to achieve the rendering requirements of the target video frame.
[0181] Exemplarily, the aspect ratio of the video frame to be processed can be 4:3, 16:9, 1:1, etc., the aspect ratio of the target area can be 4:3, 16:9, 1:1, etc., and the aspect ratio of the target video frame can be 4:3, 16:9, 1:1.
[0182] The target camera movement mode can be confirmed by selecting the target camera movement mode from a variety of candidate camera movement modes through interactive devices such as a touch screen, a remote control, and buttons. There may also be only one camera movement mode, in which case no selection is required. Exemplarily, the camera movement mode may include a push camera mode, a pull camera mode, a shake camera mode, a pan camera mode, or one or more combinations of other camera movement modes. Taking the combination of the push camera mode and the pan camera mode as an example, it may refer to the use of the push camera mode for the video to be processed in the previous time period, and the use of the pan camera mode for the video to be processed in the current time period; it may also refer to the use of the pan camera while pushing the camera to achieve the effect of pushing and panning. The principles of the combination of other camera movement modes are similar.
[0183] In this embodiment, the camera movement effect can be achieved by "cropping" the video frames to be processed, wherein the change in the target area corresponds to the camera movement mode. The main principle can be achieved by changing the size and trajectory of the target area of adjacent frames to be processed. The following examples explain the principles of cropping for various camera movement effects:
[0184] (1) Push mirror and pull mirror
[0185] Push-and-pull camera movements are the most commonly used techniques in video shooting, and can be divided into "push-in" and "pull-out." "Push-in" here can be understood as a zooming out of the camera during the filming process. Therefore, a push-in camera can show the process of gradually transitioning from a larger scene to a close-up, and the subject can be shown to dynamically change from small to large. Similarly, "pull-in" can be understood as a zooming in of the camera during the filming process. Therefore, the movement direction of the pull-in camera is opposite to that of the push-in camera, and the subject can be shown to gradually expand from a close-up to a distant shot. "Pull-in" cameras are generally used to explain the subject's environment.
[0186] For example, in order to achieve the effect of a push-mirror by "cropping", the change of the target area of the video frames to be processed with a time sequence can be set from large to small. If so, the corresponding multiple frames of target video frames can present a process of gradually converting from a larger scene to a local close-up scene. As shown in Figure 2, Figure 2 is a schematic diagram of push-mirror processing in one embodiment, the upper half of Figure 2 is three frames of video frames to be processed, and the lower half is the target video frames corresponding to the three frames of video frames to be processed. As the target area (dashed box) changes, the target object (Ferris wheel) in the target video frame becomes larger and larger, thereby presenting the effect of a push-mirror. It is easy to understand that the principle of the pull-mirror is the same, and the change of the target area of the video frames with a time sequence can be set from small to large.
[0187] (2) Moving mirror mode
[0188] Dolly shots are similar to push-pull shots, but differ in their trajectory. Push-pull shots involve forward and backward movement of the lens, while dolly shots involve unidirectional movement along a fixed trajectory. It should be understood that dolly shots primarily depict the spatial relationships between characters in a scene. Alternatively, the trajectory can be up-down, left-right, or a combination of these. The fixed trajectory is not limited to a straight or curved trajectory.
[0189] Exemplarily, to achieve the effect of a moving mirror by "cropping", the absolute positions of the target areas of adjacent video frames can be moved along the motion trajectory, and the target areas of multiple frames of video frames to be processed have the same size. Exemplarily, the target area of the video frame to be processed at the previous moment is the first position, and the target area of the video frame to be processed at the next moment is the second position. The target areas of the two frames of video frames to be processed have the same size, but the first position and the second position are different, thus achieving the effect of a moving mirror. As shown in Figure 3, Figure 3 is a schematic diagram of moving mirror processing in one embodiment, the upper half of Figure 3 is three frames of video frames to be processed, and the lower half is the target video frames corresponding to the three frames of video frames to be processed. As the target area (dashed box) changes, the picture content of the target video frame presents the effect of "left moving mirror".
[0190] (3) Panning
[0191] Similar to a panning shot, a panning shot primarily involves the reciprocating motion of the camera along a fixed trajectory. It should be understood that a panning shot primarily aims to depict the changing details of the subject's position within the scene. For example, panning shots can include alternating up-and-down or left-and-right movements.
[0192] For example, taking the up and down alternating movement as an example, in order to achieve the shaking effect of the up and down alternating movement by "cropping", the target areas of multiple frames of the video frames to be processed in a time sequence can be moved alternately. For example, the four frames of the video frames to be processed in a time sequence are recorded as the first video frame to be processed, the second video frame to be processed, the third video frame to be processed, and the fourth video frame to be processed. The target area of the first video frame to be processed is the first position, the target area of the second video frame to be processed is the second position, the target area of the third video frame to be processed is the third position, and the target area of the fourth video frame to be processed is the fourth position. As long as the first position and the third position are the same, the second position and the fourth position can achieve the effect of the up and down alternating movement.
[0193] Among them, "cropping" of the video frame to be processed can refer to using the Crop mode of the image sensor, cropping the target area of the video frame to be processed as the target video frame, mapping the pixels of the target area of the processed video frame to the target video frame, etc., which is not limited here.
[0194] In the above explanations of push-motion camera, pull-motion camera, pan-motion camera mode, and shaky-motion camera, the video frames to be processed with a time sequence may refer to adjacent video frames to be processed or to interval video frames to be processed.
[0195] The principles behind other camera movements are similar and will not be elaborated here. The target area's movement trajectory and size changes correspond to the camera operator's lens movement when implementing push, pull, pan, and pan movements.
[0196] For example, if the photographer controls the lens to move left to achieve a panning effect, then to achieve the panning effect in a video shot at a fixed position, the target area's relative position in adjacent frames of the video being processed will be shifted to the left. The principles for panning in other directions are the same; simply adjust the motion trajectory.
[0197] For example, when the photographer controls the lens to push forward to achieve a push-in effect, in order to achieve the push-in effect in the video to be processed shot at a fixed position, the size of the target area in adjacent frames of the video to be processed is set from large to small. The principle of the pull-in effect is the same.
[0198] In other words, the cameraman's up-down, left-right, or combined camera movements are simulated by following the target area's movement trajectory within the time-sequential video frames to be processed. The cameraman's forward and backward camera movements are simulated by following the size changes of the target area within the time-sequential video frames to be processed.
[0199] In some embodiments, each video frame to be processed may be cropped simultaneously to confirm the target region of each video frame to be processed; in some embodiments, each video frame to be processed may be cropped sequentially to confirm the target region of each video frame to be processed. This embodiment does not limit the order in which each video frame to be processed is processed.
[0200] S203 , obtaining a target video according to the images of the target areas of the video frames to be processed, wherein the target area of at least one of the video frames to be processed is a local area.
[0201] For example, this embodiment can obtain the target video according to the target area of each video frame to be processed through the above-mentioned "cropping". For example, this embodiment can fuse multiple frames of images while "cropping" to achieve the HDR effect.
[0202] The target area of at least one frame of the video frame to be processed is a local area, which can achieve the effects of push-pull, pan-tilt or pan-tilt camera movement.
[0203] In some embodiments, the target video can be a time-lapse video, a regular video, or a video with other effects. It should be noted that if the target video is a time-lapse video, the video to be processed can also be a time-lapse video. If the video to be processed is not a time-lapse video, the target video can be obtained by extracting frames and "cropping" the video to be processed.
[0204] This application processes the target area of the video frame to be processed into a target video frame through the "cropping" method and the preset target camera movement mode. The obtained target video can have the corresponding camera movement effect, thereby improving the display effect of the video.
[0205] In one embodiment, the video frame to be processed is captured by a shooting device under the condition that shooting conditions are met; the shooting conditions include: the shooting device maintains one or more combinations of a fixed position, a fixed orientation, or a fixed viewing angle.
[0206] It should be noted that videos shot at a fixed position, fixed orientation, or fixed viewing angle have a very monotonous visual effect, making it difficult to highlight the subject or achieve a more dynamic display effect. For such videos, the above-mentioned video processing method can be used to process videos with very monotonous visual effects into videos with camera movement effects.
[0207] In this embodiment, the shooting conditions can be met by the camera from the start time to the end time of the video to be processed; or the shooting conditions can be met by the camera for at least a period of time between the start time and the end time of the video to be processed. In this embodiment, the processing of the video frames to be processed corresponding to the video segments that meet the shooting conditions can be performed to obtain a video with a camera movement effect. Of course, in other embodiments, the same processing method can also be used for video frames that do not meet the shooting conditions.
[0208] In some embodiments, when the shooting device meets the shooting conditions, the shooting can be automatically performed to obtain the video frame to be processed.
[0209] In some embodiments, when the capture device meets the capture conditions, the capture device may be activated to capture the video frame to be processed in response to a user triggering a start instruction generated on the interactive device. In the example, the interactive device is used to interact with the user and, for example, the interactive device may be a terminal. The capture device is a device used to capture the video to be processed and, for example, may be a mobile phone, camera, etc.
[0210] In some embodiments, the shooting device can generate a start instruction in response to a trigger operation such as a button / click by the user on the interactive device, so that the shooting device can be adjusted to the time-lapse photography mode based on the start instruction, so that the time-lapse photography video can be shot in the time-lapse photography mode with one or more combinations of a fixed position, a fixed orientation or a fixed viewing angle, and the video frames to be processed are obtained from the time-lapse photography video.
[0211] In some embodiments, an image processing device (e.g., a mobile phone) can receive video frames to be processed and, based on the target camera movement pattern, identify a target region for each frame to be processed; and, based on the image of the target region in each frame to be processed, obtain a target video. The image processing device can then play or save the target video.
[0212] In one embodiment, the video to be processed corresponding to the video frame to be processed is a time-lapse video; and / or the target video is a time-lapse video.
[0213] Time-lapse photography videos have the problem of long shooting time and difficulty in camera movement. Time-lapse photography videos can be shot using time-lapse photography technology to obtain a shot time-lapse video. Afterwards, optionally, the shot time-lapse video can be directly determined as the initial time-lapse video; or, a portion of video clips can be extracted from the shot time-lapse video, and the portion of video clips can be used as the initial time-lapse video. Thus, the video frames to be processed can be determined from the initial time-lapse video. Optionally, each frame in the initial time-lapse video can be used as a video frame to be processed, that is, image processing can be performed on each frame in the initial time-lapse video; or, a segment in the initial time-lapse video can be intercepted, and each frame in the segment can be used as a video frame to be processed, that is, image processing can be performed on some frames in the initial time-lapse video. Alternatively, the video frames to be processed can be extracted from the initial time-lapse video at preset time intervals.
[0214] In one embodiment, the target region of each to-be-processed video frame satisfies: the target region of each to-be-processed video frame is a local region;
[0215] This embodiment limits the target areas to local areas, which can ensure that the target area of the next video frame to be processed has movement space.
[0216] In one embodiment, the target area of each to-be-processed video frame satisfies: the target areas of at least three adjacent to-be-processed video frames have different sizes.
[0217] This embodiment limits the sizes of the target areas of at least three adjacent frames of video frames to be processed to different sizes. When implementing push-pull camera movement, the sizes of the target areas of at least three adjacent frames of video frames to be processed change continuously, which can make the push-pull camera movement effect more delicate.
[0218] In one embodiment, the target region of each to-be-processed video frame satisfies: the absolute positions of the target regions of at least three adjacent to-be-processed video frames are different.
[0219] This embodiment limits the absolute positions of the target areas of at least three adjacent frames of video frames to be processed to different ones. When implementing a moving lens (for example, a panning lens), the absolute positions of the target areas of at least three adjacent frames of video frames to be processed change continuously, which can make the panning lens effect more delicate.
[0220] In the above embodiment, the absolute position refers to the coordinates of the target area in the corresponding video frame to be processed. The relative position described in subsequent embodiments will be different. The relative position may refer to the positional relationship between two target areas. For example, when two video frames to be processed are mapped to the same two-dimensional space, the relative position of the two target areas refers to the positional relationship between the two target areas in that two-dimensional space. It should be noted that the images of the local areas corresponding to at least two video frames to be processed must be different in order to achieve the effect of lens movement.
[0221] In one embodiment, the target camera movement mode enables the target areas of adjacent video frames to be processed to move along a preset trajectory at a preset speed.
[0222] In this embodiment, different preset trajectories can achieve different moving camera effects. For example, the preset trajectory can be a moving trajectory in the up and down direction, a moving trajectory in the left and right direction, or a moving trajectory in a composite direction between the up and down direction and the left and right direction.
[0223] Different preset speed modes can achieve a variety of video camera movement effects, such as linear movement, slow in and fast out, fast in and slow out, slow first, fast then slow again.
[0224] In one embodiment, the target areas of adjacent video frames to be processed move along a preset trajectory at a preset speed mode, including: the target areas of adjacent video frames to be processed move along a first direction at a preset speed mode; the first direction includes: horizontal direction, vertical direction or inclined direction.
[0225] The adjacent video frames to be processed may refer to all video frames of the video to be processed, or video frames of a portion of the video segments. In this embodiment, the target area moves along a first direction, ie, a fixed direction, which is conducive to simplifying the algorithm.
[0226] In one embodiment, the preset speed mode includes: in a first time period, the speed changes linearly.
[0227] In this embodiment, the first time period may refer to part or all of the time period between the start time and the end time of the video to be processed. The linear change in speed may cause the panning camera to exhibit uniform motion, uniform acceleration, or uniform deceleration. A uniformly accelerated panning camera may make the image more dynamic.
[0228] In one embodiment, the preset speed mode includes: the speed average in the second time period is different from the speed average in the third time period, wherein the second time period and the third time period are continuous in time, the speed is constant in the second time period, and the speed is constant in the third time period.
[0229] In one embodiment, the target movement mode is such that: within the fourth time period, the change in the relative position of the target area of each video frame to be processed presents one or more combinations of linear, slow in and fast out, fast in and slow out, slow first, fast then slow again.
[0230] In one embodiment, the target camera movement mode enables the sizes of target areas of adjacent video frames to be processed to change in a preset size mode.
[0231] In one embodiment, the sizes of the target areas of adjacent video frames to be processed vary in a preset size pattern, including: within a fifth preset time, the sizes of the target areas of adjacent video frames to be processed linearly increase or decrease.
[0232] In one embodiment, the sizes of the target areas of adjacent video frames to be processed vary in a preset size pattern, including: within a sixth preset time, the sizes of the target areas of adjacent video frames to be processed increase or decrease nonlinearly.
[0233] The size of the target area of adjacent video frames to be processed varies according to a preset size pattern. For example, the size of the target area of adjacent video frames to be processed can increase or decrease linearly, or can increase or decrease nonlinearly. In this way, the target area in the target video determined using the target camera movement pattern can have a variety of camera movement effects, thereby improving the display quality of the target video.
[0234] In some embodiments, a target area at each moment may be preset for each candidate camera movement mode.
[0235] In one embodiment, a method for determining a target area is provided. The step of "determining the target area of each to-be-processed video frame according to the target camera movement mode" in S202 is shown in FIG4 and includes:
[0236] S2021. Obtain at least two key locations and corresponding target area information.
[0237] Among them, the key position may include the starting position and the ending position of the to-be-processed video corresponding to the to-be-processed video frame; or the key position may also include at least one of the starting position of the target video, the ending position of the target video, or the position corresponding to the target camera mode switching. When the target camera mode switches, for example, when the target camera mode switches from horizontal left to push camera mode, a key position may be set at the moment of the target camera mode switching. The key position may be represented by a timestamp or a sequence number. It may be the starting timestamp, ending timestamp, starting frame number, ending frame number, intermediate timestamp, intermediate frame number, etc. of the target video (or the to-be-processed video).
[0238] The specific content of the target area information is not limited here, as long as a target area can be obtained according to the target area information. Taking the target area as a rectangle as an example, the target area information can be represented by four coordinate points, or by one coordinate point, width and height.
[0239] S2022. Determine target region information of each to-be-processed video frame between the two key positions according to the interpolation mode, target region information of the key positions, and the number of to-be-processed video frames between the two key positions; the interpolation mode corresponds to the target camera movement mode.
[0240] If the key positions are timestamps, each key position can be standardized first. For example, the starting timestamp is 0 and the ending timestamp is 1. The intermediate key positions can be obtained proportionally based on their positions in the target video. For example, if the key position is 2 / 5 of the total video length, it can be recorded as 0.4. Then, based on the standardized values, the target area information of each video frame to be processed can be interpolated.
[0241] For example, using linear translation interpolation as the interpolation mode with the start and end timestamps of the key positions, linear translation interpolation can be used to maintain a constant coordinate offset for the target region. This offset can be calculated based on the target region coordinates corresponding to the start and end timestamps, and the number of video frames to be processed. Starting with the target region coordinates corresponding to the start timestamp, the coordinate offsets are sequentially added to obtain the target region information for each video frame to be processed.
[0242] The position includes time information, sequence number information, etc. The key position may include the starting position and ending position of the video to be processed corresponding to the video frame to be processed; alternatively, the key position may include at least one of the starting position of the target video, the ending position of the target video, or the position corresponding to the target camera mode switch. When the target camera mode switches, for example, when the target camera mode switches from horizontal left to push camera mode, a key position may be set at the moment of the target camera mode switch.
[0243] If it is necessary to obtain the serial number information corresponding to the key position, the time information (such as timestamp) corresponding to each key position can be converted into a quantized value within a preset numerical range to obtain the serial number information corresponding to each key position. The preset numerical range can be any numerical range, such as between 0 and 1. Exemplarily, assuming that the preset numerical range is between 0 and 1, the timestamp corresponding to the key position can be converted into a quantized value between 0 and 1 to obtain the serial number information corresponding to each key position. Assuming that the key position includes the first frame in the video frame to be processed, the timestamp of the start time point corresponding to the key position can be quantized to 0, that is, the serial number information of the first frame image is 0; assuming that the key position includes the middle frame in the video frame to be processed, the timestamp of the middle time point corresponding to the key position can be quantized to 0.5, that is, the serial number information of the middle frame image is 0.5; assuming that the key position includes the last frame in the video frame to be processed, the timestamp of the end time point corresponding to the key position can be quantized to 1, that is, the serial number information of the last frame image is 1.
[0244] In one embodiment, the interpolation mode includes one or more combinations of the following modes:
[0245] (1) Linear zoom-in interpolation mode, nonlinear zoom-in interpolation mode, linear zoom-out interpolation mode, nonlinear zoom-out interpolation mode.
[0246] The linear enlargement (or reduction) interpolation mode can linearly enlarge (or reduce) the target area of each video frame to be processed, and the nonlinear enlargement (or reduction) interpolation mode can nonlinearly enlarge (or reduce) the target area of each video frame to be processed.
[0247] (2) Linear translation interpolation mode and nonlinear translation interpolation mode.
[0248] Linear translation interpolation may refer to a constant coordinate offset of the target area, and nonlinear translation interpolation may refer to a variable coordinate offset of the target area.
[0249] (3) Linear rotation interpolation mode and nonlinear rotation interpolation mode.
[0250] The linear rotation interpolation mode may mean that after the coordinates of the target area are switched to polar coordinates, the polar coordinate offset is constant, and the nonlinear translation interpolation mode may mean that the polar coordinate offset of the target area is variable.
[0251] In the above interpolation modes, linear can refer to a constant or a linear function. Nonlinear can refer to a nonlinear function, such as a piecewise function or a quadratic function. It can also refer to whether the position or size of the target area changes linearly or nonlinearly. The specific setting can be determined based on the actual effect requirements.
[0252] In one embodiment, obtaining target area information of at least two key locations includes:
[0253] Obtain a target template file; and, based on the target template file, obtain key positions and corresponding target area information.
[0254] In this embodiment, the target template file may include, but is not limited to, a JSON file, an XML file, etc. Taking the JSON file as an example, the JSON file may store information about the key location and its target area. The JSON file may be modified at any time to modify the key location and its target area information.
[0255] In another embodiment, the method further includes: acquiring an interpolation mode based on the target template file.
[0256] In the embodiment of the present application, the target template file stores the interpolation mode, and the corresponding interpolation mode can be obtained by reading the target template file.
[0257] In other embodiments, the interpolation mode may not be stored in the target template file. The correspondence between the target template file and the interpolation mode is pre-set, and based on the target template file, the interpolation mode is determined directly according to the correspondence between the target template file and the interpolation mode.
[0258] In one embodiment, confirming the selected target template file includes: selecting the target template file from the candidate template files based on user operation of the interactive device;
[0259] In the embodiment of the present application, selecting the target template file may be a target camera movement mode selected by the user, and the target camera movement mode is associated with the target template file, so the user indirectly selects the target template file.
[0260] In one embodiment, confirming the selected target template file includes: selecting the target template file from candidate template files based on content information of at least one frame of video to be processed.
[0261] In this embodiment, the video to be processed can be subjected to frame extraction recognition to identify the scene corresponding to the video to be processed, and then a corresponding target template file can be selected. For example, a plurality of candidate template files can be pre-stored in a memory, and the candidate template files correspond to the time-lapse photography scenes.
[0262] In one embodiment, assuming that the time-lapse photography scenes include different scenes such as people and vehicles, sunrise and sunset, rolling clouds and mist, day and night transitions, and blooming flowers, the following can be pre-stored: candidate template file 1 corresponds to the people and vehicles scene, candidate template file 2 corresponds to the sunrise and sunset scene, candidate template file 3 corresponds to the rolling clouds and mist scene, candidate template file 4 corresponds to the day and night transitions, and candidate template file 5 corresponds to the blooming flower scene. The user can select the corresponding target template file (target camera movement mode) based on the actual scene, or the camera can identify the scene and select the corresponding target template file (target camera movement mode).
[0263] In one embodiment, confirming the selected target template file includes: generating the target template file in response to a template file editing operation.
[0264] In this embodiment, the user can interact with the image processing device according to the camera movement requirements, and the image processing device modifies or generates a new target template file so that when performing subsequent video processing, the key position and the target area information corresponding to the key position can be obtained according to the target template file.
[0265] In one embodiment, a method for obtaining a target video is provided, namely, the step of "obtaining a target video according to the image of the target area of each video frame to be processed" in S203 above, including:
[0266] Render the corresponding target video frame according to the pixels of the target area of each video frame to be processed.
[0267] According to each target video frame, a target video is obtained.
[0268] In an embodiment of the present application, the pixels of the target area of each video frame to be processed can be used for rendering according to the target area of each video frame to be processed to obtain the target video frame corresponding to each video frame to be processed, and then splicing, smoothing and other processing can be performed according to each target video frame to obtain the target video.
[0269] In one embodiment, rendering the corresponding target video frame according to the pixels of the target area of each video frame to be processed includes: interpolating the pixel values of the target area of the video frame to be processed to obtain interpolated pixel values; and rendering the corresponding target video frame according to the interpolated pixel values.
[0270] The interpolation ratio can be determined based on the number of pixels of the target video frame, the number of pixels of the target area image, the aspect ratio of the target video frame, and the aspect ratio of the target area image.
[0271] In one embodiment, obtaining the video frame to be processed includes: decoding the video to be processed to obtain the video frame to be processed.
[0272] In an embodiment of the present application, the video to be processed can be decoded to obtain each decoded video frame to be processed, thereby obtaining the timestamp of each decoded video frame to be processed and the position of each timestamp in the entire duration of the video frame to be processed. Afterwards, the pixel values of the target area of each decoded video frame to be processed can be determined based on the timestamp and interpolation mode corresponding to each video frame to be processed. When the resolution of the target video frame has been determined, the pixel values of the target area of each video frame to be processed can be interpolated to obtain the interpolated pixel values. Thus, the interpolated pixel values can be used to render the target video frame. Furthermore, the target video can be generated based on the rendered target video frame.
[0273] The present application also provides a shooting device, including: a camera, configured to capture video frames to be processed; a memory, storing a computer program; a processor, connected to the camera and the memory respectively, and when the processor executes the computer program, the processor is configured to: confirm the target area of each video frame to be processed according to the target camera movement mode; and obtain the target video based on the picture of the target area of each video frame to be processed; wherein the target area of at least one frame of the video frame to be processed is a local area.
[0274] In one embodiment, the video frame to be processed is captured by a shooting device under conditions that satisfy shooting conditions;
[0275] The shooting conditions include: the shooting device maintains one or more combinations of a fixed position, a fixed orientation, or a fixed viewing angle.
[0276] In one embodiment, the photographing device includes an interaction device connected to a processor; the processor is configured to:
[0277] According to the user's operation on the interactive device, the camera is controlled to record the video to be processed, and the video to be processed is a time-lapse video.
[0278] In one embodiment, the target video is a time-lapse video.
[0279] In one embodiment, when the processor determines the target area of each video frame to be processed according to the target camera movement mode;
[0280] The target area of each video frame to be processed is a local area; and / or,
[0281] The target areas of at least three adjacent video frames to be processed have different sizes; and or,
[0282] The absolute positions of the target areas of at least three adjacent video frames to be processed are different.
[0283] In one embodiment, the photographing device includes an interaction device connected to a processor; the processor is configured to:
[0284] According to the user's operation on the interaction device, a target camera movement mode is selected from the candidate camera movement modes.
[0285] In one embodiment, the target mirror movement mode includes: one or more combinations of a push mirror movement mode, a pull mirror movement mode, a pan mirror movement mode, or a shift mirror movement mode.
[0286] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to: move the target areas of adjacent to-be-processed video frames along a preset trajectory at a preset speed mode.
[0287] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to change the size of the target area of each adjacent to-be-processed video frame in a preset size mode.
[0288] In one embodiment, when the processor causes the target areas of adjacent video frames to be processed to move along a preset trajectory at a preset speed mode, the processor is configured to: cause the target areas of adjacent video frames to be processed to move along a first direction at a preset speed mode; the first direction includes: a horizontal direction, a vertical direction, or an inclined direction.
[0289] In one embodiment, the preset speed mode includes:
[0290] During the first time period, the speed changes linearly; and / or, the average speed during the second time period is different from the average speed during the third time period, the second time period and the third time period are continuous in time, the speed is constant during the second time period, and the speed is constant during the third time period.
[0291] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to:
[0292] In the fourth time period, the change of the relative position of the target area of each to-be-processed video frame is made to present one or more combinations of linearity, slow in and fast out, fast in and slow out, slow first, fast then slow.
[0293] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size pattern, the processor is configured to:
[0294] During the fifth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are linearly increased or decreased.
[0295] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size pattern, the processor is configured to:
[0296] During the sixth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are nonlinearly increased or decreased.
[0297] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to:
[0298] Obtain at least two key locations and corresponding target area information;
[0299] According to the interpolation mode and the target area information of the key positions, the target area information of each to-be-processed video frame between the two key positions is determined; the interpolation mode corresponds to the target camera movement mode.
[0300] In one embodiment, the interpolation mode includes one or more combinations of the following modes:
[0301] Linear zoom interpolation mode, nonlinear zoom interpolation mode, linear zoom interpolation mode, nonlinear zoom interpolation mode, linear translation interpolation mode, nonlinear translation interpolation mode, linear rotation interpolation mode, nonlinear rotation interpolation mode.
[0302] In one embodiment, when the processor obtains target area information of at least two key locations, the processor is configured to:
[0303] Get the target template file;
[0304] Based on the target template file, obtain key locations and corresponding target area information.
[0305] In one embodiment, the processor is further configured to:
[0306] Gets the interpolation mode based on the target template file.
[0307] In one embodiment, when the processor obtains the target template file, the processor is configured to:
[0308] selecting a target template file from candidate template files based on a user's operation on the interactive device;
[0309] and / or, selecting a target template file from candidate template files based on content information of at least one video frame to be processed;
[0310] And / or, in response to a template file editing operation, a target template file is generated.
[0311] In one embodiment, when the processor obtains the target video based on the image of the target area of each video frame to be processed, the processor is configured to:
[0312] Rendering the corresponding target video frame according to the pixels of the target area of each video frame to be processed;
[0313] According to each target video frame, a target video is obtained.
[0314] In one embodiment, when the processor renders the corresponding target video frame according to the pixels of the target area of each to-be-processed video frame, the processor is configured to:
[0315] Performing interpolation processing on the pixel values of the target area of the video frame to be processed to obtain interpolated pixel values;
[0316] Render the corresponding target video frame according to the interpolated pixel value.
[0317] In one embodiment, the camera has a field of view greater than 120 degrees; the camera device further includes a display screen connected to the processor, and the processor is further configured to:
[0318] Control the display screen to preview or play the target video.
[0319] In the embodiments of the present application, since the capture device includes a camera and a memory, after the camera captures the video frames to be processed, the memory can directly determine the target area of each video frame to be processed based on the target camera movement mode; and, based on the image of the target area of each video frame to be processed, the target video can be obtained. This means that the capture device has a built-in function for generating the target video. The methods for obtaining the video frames to be processed and generating the target video can be referred to in the above embodiments and are not further described here.
[0320] The present application provides an image processing device, comprising: a communication component for communicating with an external device to obtain a video to be processed, wherein the video to be processed includes multiple frames of video to be processed; a memory storing a computer program; a processor connected to the communication component and the memory, respectively, and when the processor executes the computer program, the processor is configured to: confirm a target area of each video frame to be processed according to a target camera movement mode; and obtain a target video based on the picture of the target area of each video frame to be processed; the target area of at least one frame of the video frame to be processed is a local area.
[0321] In one embodiment, the video frame to be processed is captured by a shooting device under conditions that satisfy shooting conditions;
[0322] The shooting conditions include: the shooting device maintains one or more combinations of a fixed position, a fixed orientation, or a fixed viewing angle.
[0323] In one embodiment, the video to be processed corresponding to the video frame to be processed is a time-lapse video; and / or a time-lapse video of the target video.
[0324] In one embodiment, when the processor determines the target area of each video frame to be processed according to the target camera movement mode,
[0325] The target area of each video frame to be processed is a local area; and / or,
[0326] The target areas of at least three adjacent video frames to be processed have different sizes; and or,
[0327] The absolute positions of the target areas of at least three adjacent video frames to be processed are different.
[0328] In one embodiment, the image processing device includes an interaction device connected to a processor; the processor is configured to:
[0329] According to the user's operation on the interaction device, a target camera movement mode is selected from the candidate camera movement modes.
[0330] In one embodiment, the target camera movement mode includes:
[0331] One or more combinations of push mirror mode, pull mirror mode, pan mirror mode or pan mirror mode.
[0332] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to move the target areas of adjacent to-be-processed video frames along a preset trajectory at a preset speed mode.
[0333] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement pattern, the processor is configured to change the size of the target area of each adjacent to-be-processed video frame in a preset size pattern.
[0334] In one embodiment, when the processor causes the target areas of adjacent video frames to be processed to move along a preset trajectory at a preset speed mode, the processor is configured to cause the target areas of adjacent video frames to be processed to move along a first direction at a preset speed mode; the first direction includes: horizontal direction, vertical direction or inclined direction.
[0335] In one embodiment, the preset speed mode includes:
[0336] During the first time period, the speed changes linearly; and / or, the average speed during the second time period is different from the average speed during the third time period, the second time period and the third time period are continuous in time, the speed is constant during the second time period, and the speed is constant during the third time period.
[0337] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to:
[0338] In the fourth time period, the change of the relative position of the target area of each to-be-processed video frame is made to present one or more combinations of linearity, slow in and fast out, fast in and slow out, slow first, fast then slow.
[0339] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size pattern, the processor is configured to:
[0340] During the fifth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are linearly increased or decreased.
[0341] In one embodiment, when the processor changes the size of the target area of each adjacent video frame to be processed in a preset size pattern, the processor is configured to:
[0342] During the sixth preset time, the sizes of the target areas of the adjacent to-be-processed video frames are nonlinearly increased or decreased.
[0343] In one embodiment, when the processor determines the target area of each to-be-processed video frame according to the target camera movement mode, the processor is configured to:
[0344] Obtain at least two key locations and corresponding target area information;
[0345] According to the interpolation mode and the target area information of the key positions, the target area information of each to-be-processed video frame between the two key positions is determined; the interpolation mode corresponds to the target camera movement mode.
[0346] In one embodiment, the interpolation mode includes one or more combinations of the following modes:
[0347] Linear zoom interpolation mode, nonlinear zoom interpolation mode, linear zoom interpolation mode, nonlinear zoom interpolation mode, linear translation interpolation mode, nonlinear translation interpolation mode, linear rotation interpolation mode, nonlinear rotation interpolation mode.
[0348] In one embodiment, when the processor obtains target area information of at least two key locations, the processor is configured to:
[0349] Get the target template file;
[0350] Based on the target template file, obtain key locations and corresponding target area information.
[0351] In one embodiment, the processor is further configured to:
[0352] Gets the interpolation mode based on the target template file.
[0353] In one embodiment, when the processor obtains the target template file, the processor is configured to:
[0354] selecting a target template file from candidate template files based on a user's operation on the interactive device;
[0355] and / or, selecting a target template file from candidate template files based on content information of at least one video frame to be processed;
[0356] And / or, in response to a template file editing operation, a target template file is generated.
[0357] In one embodiment, when the processor obtains the target video based on the image of the target area of each video frame to be processed, the processor is configured to:
[0358] Rendering the corresponding target video frame according to the pixels of the target area of each video frame to be processed;
[0359] According to each target video frame, a target video is obtained.
[0360] In one embodiment, when the processor renders the corresponding target video frame according to the pixels of the target area of each to-be-processed video frame, the processor is configured to:
[0361] Performing interpolation processing on the pixel values of the target area of the video frame to be processed to obtain interpolated pixel values;
[0362] Render the corresponding target video frame according to the interpolated pixel value.
[0363] In one embodiment, the processor is configured to:
[0364] After obtaining the video to be processed, the video to be processed is decoded to obtain a video frame to be processed.
[0365] In one embodiment, the image processing device includes a display screen connected to a processor, and the processor is further configured to:
[0366] Control the display screen to preview or play the target video.
[0367] In an embodiment of the present application, the image processing device is communicatively connected to the external device, that is, the video to be processed shot in the external device can be sent to the image processing device by means of communication transmission, so that the image processing device can obtain the video to be processed. Wherein, the video to be processed includes multiple frames of video frames to be processed, and the communication transmission method can be a wireless transmission method via wifi (mobile hotspot, Wireless Fidelity), Bluetooth, etc. After the image processing device obtains the video frames to be processed, the image processing device can confirm the target area of each video frame to be processed according to the target mirror movement mode; and, based on the picture of the target area of each video frame to be processed, obtain the target video. The implementation method of generating the target video can refer to the above embodiment and will not be repeated here.
[0368] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0369] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0370] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0371] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0372] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A video processing method, characterized in that, it includes: obtaining a video frame to be processed; confirming the target area of each of the video frames to be processed according to the target camera movement mode; and obtaining a target video according to the images of the target areas of each of the video frames to be processed, wherein the target area of at least one of the video frames to be processed is a local area.
2. The method according to claim 1, characterized in that, the video frame to be processed is obtained by a shooting device under shooting conditions; the shooting conditions include: the shooting device maintains one or a combination of a fixed position, a fixed orientation, or a fixed viewing angle.
3. The method according to claim 1, characterized in that, the video to be processed corresponding to the video frame to be processed is a time-lapse video; and / or, the target video is a time-lapse video.
4. The method according to claim 1, characterized in that, the target areas of each of the video frames to be processed are all local areas; and / or, the sizes of the target areas of at least three adjacent video frames to be processed are different; and / or, the absolute positions of the target areas of at least three adjacent video frames to be processed are different.
5. The method according to claim 1, characterized in that, the method further includes: selecting a target camera movement mode from candidate camera movement modes according to the user's operation on the interaction device.
6. The method according to any one of claims 1-5, characterized in that, the camera movement mode includes: one or a combination of a push camera movement mode, a pull camera movement mode, a pan camera movement mode, or a dolly camera movement mode.
7. The method according to any one of claims 1-5, characterized in that, the target camera movement mode enables: the target areas of adjacent video frames to be processed move along a preset trajectory in a preset speed mode; and / or, the sizes of the target areas of adjacent video frames to be processed change in a preset size mode.
8. The method according to claim 7, characterized in that, the target areas of adjacent video frames to be processed move along a preset trajectory in a preset speed mode, including: the target areas of adjacent video frames to be processed move along a first direction in a preset speed mode; the first direction includes: a horizontal direction, a vertical direction, or an inclined direction.
9. The method according to claim 7, characterized in that, the preset speed mode includes: within a first time period, the speed changes linearly; and / or, the average speed within a second time period is different from the average speed within a third time period, wherein the second time period and the third time period are time-continuous, the speed is constant within the second time period, and the speed is constant within the third time period.
10. The method according to claim 1, characterized in that, the target camera movement mode enables: within a fourth time period, the change in the relative positions of the target areas of each of the video frames to be processed presents one or a combination of linear, slow-in-fast-out, fast-in-slow-out, or slow-fast-slow.
11. The method according to claim 7, characterized in that, the sizes of the target areas of adjacent video frames to be processed change in a preset size mode, including: Within a fifth preset time, the sizes of the target regions of adjacent video frames to be processed increase or decrease linearly.
12. The method according to claim 7, wherein, the sizes of the target regions of adjacent video frames to be processed change in a preset size mode, including: Within a sixth preset time, the sizes of the target regions of adjacent video frames to be processed increase or decrease non-linearly.
13. The method according to claim 1, wherein, confirming the target regions of the video frames to be processed according to the target camera movement mode includes: obtaining at least two key positions and corresponding target region information; determining the target region information of each of the video frames to be processed between the two key positions according to an interpolation mode and the target region information of the key positions; the interpolation mode corresponds to the target camera movement mode.
14. The method according to claim 13, wherein, the interpolation mode includes one or a combination of the following modes: linear magnification interpolation mode, non-linear magnification interpolation mode, linear reduction interpolation mode, non-linear reduction interpolation mode, linear translation interpolation mode, non-linear translation interpolation mode, linear rotation interpolation mode, non-linear rotation interpolation mode.
15. The method according to claim 13, wherein, obtaining the target region information of at least two key positions includes: obtaining a target template file; based on the target template file, obtaining the key positions and corresponding target region information.
16. The method according to claim 15, wherein, the method further includes: based on the target template file, obtaining the interpolation mode.
17. The method according to claim 15, wherein, obtaining the target template file includes one of the following methods: selecting the target template file from candidate template files based on a user's operation on an interaction device; selecting the target template file from candidate template files based on the content information of at least one frame of the video frames to be processed; responding to a template file editing operation to generate a target template file.
18. The method according to claim 1, wherein, obtaining a target video according to the images of the target regions of the video frames to be processed includes: rendering corresponding target video frames according to the pixels of the target regions of the video frames to be processed; obtaining the target video according to the target video frames.
19. The method according to claim 18, wherein, rendering corresponding target video frames according to the pixels of the target regions of the video frames to be processed includes: performing interpolation processing on the pixel values of the target regions of the video frames to be processed to obtain interpolated pixel values; rendering corresponding target video frames according to the interpolated pixel values.
20. The method according to claim 18, wherein, obtaining the video frames to be processed includes: decoding the video to be processed to obtain the video frames to be processed.
21. A shooting device, wherein, comprising: a camera configured to collect video frames to be processed; a memory storing a computer program; A processor, which is respectively connected to the camera and the memory. When the processor executes the computer program, the processor is configured to: Confirm the target area of each of the to-be-processed video frames according to the target camera movement mode; and Obtain a target video based on the images of the target areas of each of the to-be-processed video frames; wherein, the target area of at least one of the to-be-processed video frames Is a partial area.
22. The shooting device according to claim 21, Characterized in that The to-be-processed video frames are obtained by the shooting device when shooting conditions are met; The shooting conditions include: the shooting device maintaining one or more combinations of a fixed position, a fixed orientation, or a fixed perspective.
23. The shooting device according to claim 21, Characterized in that The shooting device includes an interaction device, and the interaction device is connected to the processor; the processor is configured to: Control the camera to record a to-be-processed video according to the user's operation on the interaction device, and the to-be-processed video is a time-lapse video.
24. The shooting device according to claim 21, Characterized in that The target video is a time-lapse video.
25. The shooting device according to claim 21, Characterized in that When the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode; The target areas of each of the to-be-processed video frames are all partial areas; and / or, The sizes of the target areas of at least three adjacent to-be-processed video frames are different; And / or, The absolute positions of the target areas of at least three adjacent to-be-processed video frames are different.
26. The shooting device according to claim 21, Characterized in that The shooting device includes an interaction device, and the interaction device is connected to the processor; the processor is configured to: Select a target camera movement mode from candidate camera movement modes according to the user's operation on the interaction device.
27. The shooting device according to any one of claims 21-26, Characterized in that The target camera movement mode includes: one or more combinations of a push camera movement mode, a pull camera movement mode, a pan camera movement mode, or a dolly camera movement mode.
28. The shooting device according to any one of claims 21-26, Characterized in that When the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to: make the target areas of adjacent to-be-processed video frames move along a preset trajectory in a preset speed mode.
29. The shooting device according to any one of claims 21-26, Characterized in that When the processor confirms the target area of each of the to-be-processed video frames according to the target camera movement mode, the processor is configured to: make the sizes of the target areas of adjacent to-be-processed video frames change in a preset size mode.
30. The shooting device according to claim 28, Characterized in that When the processor causes the target regions of adjacent video frames to be processed to move along a preset trajectory in a preset speed mode, the processor is configured to: cause the target regions of adjacent video frames to be processed to move in a preset speed mode in a first direction; the first direction includes: a horizontal direction, a vertical direction, or an inclined direction.
31. The photographing device according to claim 30, wherein, the preset speed mode includes: in a first time period, the speed changes linearly; and / or, the average speed in a second time period is different from the average speed in a third time period, the second time period and the third time period are continuous in time, the speed is constant in the second time period, and the speed is constant in the third time period.
32. The photographing device according to claim 21, wherein, when the processor determines the target regions of the video frames to be processed according to the target camera movement mode, the processor is configured to: in a fourth time period, cause the change in the relative positions of the target regions of the video frames to be processed to exhibit one or more combinations of linear, slow-in fast-out, fast in slow-out, slow-first then fast then slow.
33. The photographing device according to claim 29, wherein, when the processor causes the sizes of the target regions of adjacent video frames to be processed to change in a preset size mode, the processor is configured to: in a fifth preset time, cause the sizes of the target regions of adjacent video frames to be processed to increase or decrease linearly.
34. The photographing device according to claim 29, wherein, when the processor causes the sizes of the target regions of adjacent video frames to be processed to change in a preset size mode, the processor is configured to: in a sixth preset time, cause the sizes of the target regions of adjacent video frames to be processed to increase or decrease non-linearly.
35. The photographing device according to claim 21, wherein, when the processor determines the target regions of the video frames to be processed according to the target camera movement mode, the processor is configured to: acquire at least two key positions and corresponding target region information; determine the target region information of each of the video frames to be processed between the two key positions according to an interpolation mode and the target region information of the key positions; the interpolation mode corresponds to the target camera movement mode.
36. The photographing device according to claim 35, wherein, the interpolation mode includes one or more combinations of the following modes: linear magnification interpolation mode, non-linear magnification interpolation mode, linear reduction interpolation mode, non-linear reduction interpolation mode, linear translation interpolation mode, non-linear translation interpolation mode, linear rotation interpolation mode, non-linear rotation interpolation mode.
37. The photographing device according to claim 35, wherein, when the processor acquires the target region information of at least two key positions, the processor is configured to: acquire a target template file; based on the target template file, acquire the key positions and corresponding target region information.
38. The photographing device according to claim 37, wherein, the processor is further configured to: Obtain the interpolation mode based on the target template file.
39. The photographing device according to claim 37, wherein, when the processor obtains the target template file, the processor is configured to: select the target template file from candidate template files based on a user's operation on an interaction device; and / or, select the target template file from candidate template files based on content information of at least one frame of the video frames to be processed; and / or, generate a target template file in response to a template file editing operation.
40. The photographing device according to claim 21, wherein, when the processor obtains a target video based on the images of the target regions of the video frames to be processed, the processor is configured to: render corresponding target video frames according to the pixels of the target regions of the video frames to be processed; obtain the target video according to the target video frames.
41. The photographing device according to claim 40, wherein, when the processor renders corresponding target video frames according to the pixels of the target regions of the video frames to be processed, the processor is configured to: perform interpolation processing on the pixel values of the target regions of the video frames to be processed to obtain interpolated pixel values; render corresponding target video frames according to the interpolated pixel values.
42. The photographing device according to claim 21, wherein, the field of view angle of the camera is greater than 120 degrees; the photographing device further includes a display screen, the display screen is connected to the processor, and the processor is further configured to: control the display screen to preview or play the target video.
43. An image processing device, wherein, comprising: a communication component, configured to communicate with an external device to obtain a video to be processed, the video to be processed including multiple video frames to be processed; a memory, storing a computer program; a processor, connected to the communication component and the memory respectively, when the processor executes the computer program, the processor is configured to: confirm the target regions of the video frames to be processed according to a target camera movement mode; and obtain a target video according to the images of the target regions of the video frames to be processed; the target region of at least one frame of the video frames to be processed is a partial region.
44. The image processing device according to claim 43, wherein, the video frames to be processed are obtained by a photographing device under shooting conditions; the shooting conditions include: the photographing device maintaining one or more combinations of a fixed position, a fixed orientation, or a fixed viewing angle.
45. The image processing device according to claim 43, wherein, the video to be processed corresponding to the video frames to be processed is a time-lapse video; and / or, the target video is a time-lapse video.
46. The image processing device according to claim 43, wherein, when the processor confirms the target regions of the video frames to be processed according to a target camera movement mode, the target regions of the video frames to be processed are all partial regions; and / or, The sizes of the target regions of at least three adjacent frames of the video frames to be processed are different; and / or, The absolute positions of the target regions of at least three adjacent frames of the video frames to be processed are different.
47. The image processing device according to claim 43, wherein, The image processing device includes an interaction device, and the interaction device is connected to the processor; the processor is configured to: Select a target camera movement mode from candidate camera movement modes according to the user's operation on the interaction device.
48. The image processing device according to any one of claims 43-47, wherein, The target camera movement mode includes: One or a combination of a push camera movement mode, a pull camera movement mode, a pan camera movement mode, or a dolly camera movement mode.
49. The image processing device according to any one of claims 43-47, wherein, When the processor confirms the target regions of the video frames to be processed according to the target camera movement mode, the processor is configured to cause the target regions of adjacent video frames to be processed to move along a preset trajectory in a preset speed mode.
50. The image processing device according to any one of claims 43-47, wherein, When the processor confirms the target regions of the video frames to be processed according to the target camera movement mode, the processor is configured to cause the sizes of the target regions of adjacent video frames to be processed to change in a preset size mode.
51. The image processing device according to claim 49, wherein, When the processor causes the target regions of adjacent video frames to be processed to move along a preset trajectory in a preset speed mode, the processor is configured to cause the target regions of adjacent video frames to be processed to move in a preset speed mode in a first direction; the first direction includes: a horizontal direction, a vertical direction, or an inclined direction.
52. The image processing device according to claim 49, wherein, The preset speed mode includes: In a first time period, the speed changes linearly; and / or, the average speed in a second time period is different from the average speed in a third time period, the second time period and the third time period are continuous in time, the speed is constant in the second time period, and the speed is constant in the third time period.
53. The image processing device according to claim 43, wherein, When the processor confirms the target regions of the video frames to be processed according to the target camera movement mode, the processor is configured to: In a fourth time period, cause the change in the relative positions of the target regions of the video frames to be processed to present one or a combination of linear, slow start and fast end, fast start and slow end, slow first and then fast and then slow.
54. The image processing device according to claim 50, wherein, When the processor causes the sizes of the target regions of adjacent video frames to be processed to change in a preset size mode, the processor is configured to: In a fifth preset time, cause the sizes of the target regions of adjacent video frames to be processed to increase or decrease linearly.
55. The image processing device according to claim 50, wherein, When the processor causes the size of the target region of each adjacent video frame to be processed to change in a preset size mode, the processor is configured to: Within the sixth preset time, cause the size of the target region of each adjacent video frame to be processed to increase or decrease non-linearly.
56. The image processing device according to claim 43, wherein, When the processor confirms the target region of each video frame to be processed according to the target camera movement mode, the processor is configured to: Obtain at least two key positions and corresponding target region information; Determine the target region information of each video frame to be processed between the two key positions according to the interpolation mode and the target region information of the key positions; the interpolation mode corresponds to the target camera movement mode.
57. The image processing device according to claim 56, wherein, The interpolation mode includes one or a combination of the following modes: Linear magnification interpolation mode, non-linear magnification interpolation mode, linear reduction interpolation mode, non-linear reduction interpolation mode, linear translation interpolation mode, non-linear translation interpolation mode, linear rotation interpolation mode, non-linear rotation interpolation mode.
58. The image processing device according to claim 56, wherein, When the processor obtains the target region information of at least two key positions, the processor is configured to: Obtain a target template file; Based on the target template file, obtain the key positions and corresponding target region information.
59. The image processing device according to claim 58, wherein, The processor is further configured to: Based on the target template file, obtain the interpolation mode.
60. The image processing device according to claim 58, wherein, When the processor obtains the target template file, the processor is configured to: Select the target template file from the candidate template files based on the user's operation on the interaction device; and / or, select the target template file from the candidate template files based on the content information of at least one frame of the video frame to be processed; and / or, generate a target template file in response to a template file editing operation.
61. The image processing device according to claim 43, wherein, When the processor obtains a target video based on the images of the target regions of each video frame to be processed, the processor is configured to: Render the corresponding target video frame according to the pixels of the target region of each video frame to be processed; Obtain the target video according to each target video frame.
62. The image processing device according to claim 61, wherein, When the processor renders the corresponding target video frame according to the pixels of the target region of each video frame to be processed, the processor is configured to: Perform interpolation processing on the pixel values of the target region of the video frame to be processed to obtain interpolated pixel values; Render the corresponding target video frame according to the interpolated pixel values.
63. The image processing device according to claim 43, wherein, The processor is configured to: After obtaining the video to be processed, decode the video to be processed to obtain video frames to be processed.
64. The image processing apparatus according to claim 61, wherein, the image processing apparatus includes a display screen, the display screen is connected to the processor, and the processor is further configured to: control the display screen to preview or play the target video.
Citation Information
Patent Citations
Video generation method and device and electronic device
CN112019768A
Motion track generation method and device, equipment and medium
CN114820704A
Moving object tracking method and device, computer readable medium and electronic equipment
CN115240107A
Method and apparatus for processing video, and storage medium
US20210337136A1