WO2021056353A1 - Video editing method, and terminal apparatus - Google Patents

Video editing method, and terminal apparatus Download PDF

Info

Publication number
WO2021056353A1
WO2021056353A1 PCT/CN2019/108264 CN2019108264W WO2021056353A1 WO 2021056353 A1 WO2021056353 A1 WO 2021056353A1 CN 2019108264 W CN2019108264 W CN 2019108264W WO 2021056353 A1 WO2021056353 A1 WO 2021056353A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
time period
sequence
videos
motion state
Prior art date
Application number
PCT/CN2019/108264
Other languages
French (fr)
Chinese (zh)
Inventor
周游
蔡剑钊
苏坤岳
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/108264 priority Critical patent/WO2021056353A1/en
Priority to CN201980032384.6A priority patent/CN112166599A/en
Publication of WO2021056353A1 publication Critical patent/WO2021056353A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • This application relates to the field of video processing, and in particular to a video editing method and terminal equipment.
  • a commonly used way of editing videos is: the user selects a video used to generate the clipped video from all videos, and the user determines the order of the selected videos.
  • the user needs to select the video used to generate the edited video, the user needs to perform cumbersome operations in the process of editing the video.
  • the user determines the order of the selected video by himself. The judgment ability is limited, it is difficult to accurately judge whether the edited video can have a good viewing effect, and the editing effect is not good.
  • the embodiments of the present application provide a video editing method and a terminal device, which can automatically sort videos to generate a clipped video.
  • an embodiment of the present application provides a video editing method, which includes:
  • a clipped video is generated.
  • an embodiment of the present application provides a terminal device, the terminal device includes a processor, and the processor is configured to:
  • a clipped video is generated.
  • a video sequence is determined automatically according to the motion state of the shooting device corresponding to the video, so that a clipped video is automatically generated according to the video sequence.
  • the video sequence is determined according to the state of the shooting device corresponding to the video, so that the edited video provided to the user has a better viewing ability and improves the editing effect.
  • Fig. 1 schematically shows a flowchart of a video editing method provided by an embodiment of the present application
  • Figure 2 schematically shows a schematic diagram of a principle of searching for a video sequence
  • FIG. 3 schematically shows the effect diagram of the association relationship between the video and the rhythm point in the video sequence in the time sequence
  • Fig. 4 schematically shows a structure diagram of a terminal device.
  • the video editing method provided in the embodiments of the present application can provide users with automatically generated edited videos with better viewing quality.
  • the user controls the drone to fly in different environments (such as the seaside, the top of the mountain, the playground, the lakeside), such as flying around the point of interest and shooting to get Video A, Video B, Video C, Video D, etc. Multiple videos.
  • the video sequence can be determined. For example, each video is divided into multiple videos. Video A is divided to obtain video A1, video A2, video A3, and video A4, and video B is divided to obtain video B1, video B2, video B3, and video B4. The video C is divided to obtain video C1, video C2, video C3, and video C4. The video D is divided to obtain video D1, video D2, video D3, and video D4. The video sequences of A1, B2, C3, D4, or video sequences of A1, C2, B3, D4, etc. may be determined according to the motion state of the shooting device corresponding to each video in all the videos obtained by division. For each video sequence, all videos in the video sequence can be spliced to obtain a clipped video.
  • the user When the user needs to edit the video obtained by shooting, it can provide the user with all the clipped videos that are automatically generated.
  • the motion states of the shooting devices corresponding to any two adjacent videos in the video sequence determined by the video editing method provided by the embodiments of the present application are matched, so that the automatically generated clipped video has better viewing ability and will be automatically generated
  • the edited video with good viewing quality is provided to users, which can enable users to avoid the tedious operation of manual editing.
  • FIG. 1 shows a flowchart of a video editing method provided by an embodiment of the present application.
  • the method includes the following steps:
  • Step 101 Obtain multiple videos, and the multiple videos are captured by a shooting device.
  • the multiple acquired videos are videos taken by the camera during exercise.
  • the method before acquiring multiple videos, the method further includes: acquiring multiple original videos; and dividing the multiple original videos to obtain multiple videos.
  • multiple original videos may be acquired first.
  • each original video can be divided into multiple videos. After each original video is divided into multiple videos, all the videos obtained through the division constitute the multiple obtained videos.
  • Step 102 Acquire the motion state of the shooting device corresponding to each video in the multiple videos.
  • the camera is set on a movable platform
  • the movable platform includes a drone, an autonomous vehicle, and a handheld stabilizer.
  • the movement state of the photographing device includes one or more of the movement direction, movement trajectory, movement speed, and height of the photographing device.
  • acquiring the motion state of the shooting device corresponding to each video in the plurality of videos includes: acquiring the motion state of the shooting device corresponding to each video in the multiple videos at the start time period and the motion state of the shooting device corresponding to the end time period. The motion state of the camera.
  • the start time period of the video may be a certain time period within the shooting time period of the video with the start time of the shooting time period of the video as the start time.
  • the end time period of the video may be a certain length of time within the shooting time period of the video, with the time adjacent to the end time of the shooting time period of the video as the start time and the end time of the shooting time period of the video as the end time. Time period.
  • obtaining the motion state of the shooting device corresponding to the start time period and the motion state of the shooting device corresponding to the end time period of each video in the multiple videos includes: obtaining the start time period of each video Video frame and video frame of the end time period; according to the video frame of the start time period and the video frame of the end time period, determine the motion state of the shooting device corresponding to each video in the start time period and the shooting device corresponding to the end time period The state of exercise.
  • the video frame in the start period of the video is a video frame obtained by shooting during the start period of the video
  • the video frame in the end period of the video is the video frame in the video.
  • the motion state of the shooting device corresponding to the video at the start time period can be determined according to the video frame of the start time period in the video.
  • the motion state of the shooting device corresponding to the video at the end time period can be determined according to the video frame at the end time period of the video.
  • VO Visual Odometry
  • SLAM simultaneous localization and mapping
  • the motion state of the camera corresponding to each video in the start time period and the motion state of the camera corresponding to the end time period are determined, Including: obtaining the feature points of the video frame in the starting time period; matching the feature points of the video frame in the starting time period to obtain the motion state of the shooting device corresponding to the starting time period; obtaining the video frame in the ending time period Feature points; feature point matching is performed on the feature points of the video frame at the end time period to obtain the motion state of the shooting device corresponding to the end time period.
  • the motion state of the shooting device corresponding to the start time period of the video or the motion state of the shooting device corresponding to the end time period of the video you can first obtain the start time period of the video or the end time period of the video through shooting. Multiple video frames, determine the feature points in each of the multiple video frames.
  • the feature points in the video frame may be corner points of the video frame. Corner detection algorithms such as FAST (features from accelerated segment test), SUSAN, and Harris operator can be used to detect corners of video frames. Then, the feature points in each video frame that match the feature points in other video frames are detected.
  • the motion vector of the shooting device at the start time period of the video or at the end time period of the video is obtained, thereby , Get the motion state of the shooting device corresponding to the video at the start time period or the motion state of the shooting device corresponding to the video at the end time period.
  • feature points in each video frame that match feature points in other video frames can be detected. Then, according to the coordinates in the image coordinate system of the feature points in each video frame that match the feature points in other video frames, according to the features in each video frame that match the feature points in other video frames Point the coordinates in the image coordinate system, estimate the movement of the camera of the movable platform during the start time period or end time period of the video, and then further calculate the start time period of the video or the end of the video The motion vector of the shooting device in the time period, thereby obtaining the motion state of the shooting device corresponding to the video at the start time period or the motion state of the shooting device corresponding to the video at the end time period.
  • a Gaussian pyramid can be established for each of the multiple video frames obtained by shooting during the start time period or the end time period.
  • For each of the Gaussian pyramids of each video frame Layer find the feature points that match the feature points in the corresponding layer in the Gaussian pyramid of other video frames.
  • the feature points in all layers in the Gaussian pyramid of the video frame that match the feature points in the corresponding layer in the Gaussian pyramid of other video frames are regarded as the difference between the video frame and other video frames. Feature points that match the feature points.
  • Step 103 Sort the multiple videos to determine a video sequence according to the motion state of the shooting device corresponding to each video.
  • one or more video sequences may be determined according to the motion state of the shooting device corresponding to each of the obtained multiple videos.
  • the motion state of the camera may be described by multiple parameters.
  • the motion state of the camera corresponding to the video includes one or more of the motion direction, trajectory, motion speed, and height of the camera.
  • the motion trajectory of the shooting device is an arc during the shooting of the video
  • the starting point and the end point of the motion trajectory can be determined, and the direction from the starting point to the end point is regarded as the shooting in the process of shooting the video.
  • the direction of movement of the device is an arc during the shooting of the video.
  • the motion states of the camera corresponding to any two adjacent videos in the video sequence match. Matching the motion states of the shooting devices corresponding to two adjacent videos can make the edited video have better viewing. Whether the two videos match can be determined based on the two videos meeting corresponding preset matching conditions.
  • the movement direction of the camera corresponding to one of the two adjacent videos in the video sequence and the movement direction of the camera corresponding to the other video are quite different.
  • the direction of the movement corresponding to one video is different from that of the other video.
  • the corresponding movement direction is vertical, so that when the clip video generated according to the video sequence is played, the switching of two adjacent videos produces an impactful visual effect, and the clip video has better viewing.
  • the preset matching condition may include: the difference between the movement direction of the camera corresponding to one video and the movement direction of the camera corresponding to the other video is greater than the movement direction difference threshold.
  • the one video and the other video are regarded as the video sequence Two adjacent videos.
  • the height of the camera corresponding to one of the two adjacent videos in the video sequence is different from the height of the camera corresponding to the other
  • the switching of two adjacent videos produces an impactful visual effect, and the clip video has better viewing.
  • the preset matching condition may include: the height difference between the height of the camera corresponding to one video and the height of the camera corresponding to the other video is greater than the height difference threshold.
  • the one video and the Another video can be used as two adjacent videos in a video sequence.
  • the angle between the motion direction corresponding to one video in the two adjacent videos in the video sequence and the motion direction corresponding to the other video is within a preset angle range associated with visually smooth switching , So that the switching of the two adjacent videos is a visually smooth switching, and the edited video has better viewing.
  • the preset matching condition may include: an angle between a motion direction corresponding to one video and a motion direction corresponding to another video is within a preset angle range associated with visually smooth switching.
  • the one video and the other video can be regarded as two adjacent videos in the video sequence.
  • the motion state of the camera corresponding to the end period of the first video in the video sequence matches the motion state of the camera corresponding to the start period of the second video
  • the first video and the second video are Videos that are adjacent in sequence in a video sequence.
  • the position of the first video in the video sequence may precede the position of the second video in the video sequence.
  • the video with the first position in the video sequence among the two adjacent videos can be called the first video
  • the video with the second position in the video sequence among the two adjacent videos can be called the second video. video.
  • a video sequence found includes: A1, B2, C3, D4.
  • the order in the video sequence is A1, B2, C3, D4.
  • A1 and B2 A1 is the first video
  • B2 is the second video
  • the motion state of the camera corresponding to the end time period of A1 matches the motion state of the camera corresponding to the start time period of B2.
  • B2 is the first video
  • C3 is the second video
  • the motion state of the camera corresponding to the end time period of B2 matches the motion state of the camera corresponding to the start time period of C3.
  • C3 and D4 is the first video
  • the motion state of the camera corresponding to the end period of C3 in the video sequence matches the motion state of the camera corresponding to the start period of D4.
  • two videos that are adjacent in time sequence in the video sequence belong to different original videos.
  • the motion state of the shooting device corresponding to the end time period of the first video in the video sequence matches the motion state of the shooting device corresponding to the start time period of the second video, including: the end time of the first video
  • the movement direction of the camera corresponding to the segment is consistent with the movement direction of the camera corresponding to the start time period of the second video.
  • a video sequence found includes: A1, B2, C3, D4.
  • the order in the video sequence is A1, B2, C3, D4.
  • A1 is the first video
  • B2 is the second video
  • the motion direction of the camera corresponding to the end time period of A1 is consistent with the motion direction of the camera corresponding to the start time period of B2.
  • B2 and C3 B2 is the first video
  • C3 is the second video
  • the motion direction of the camera corresponding to the end time period of B2 is consistent with the motion direction of the camera corresponding to the start time period of C3.
  • C3 is the first video
  • D4 is the second video
  • the motion direction of the camera corresponding to the end time period of C3 is consistent with the motion direction of the camera corresponding to the start time period of D4.
  • the motion direction of the camera corresponding to the end time period of the first video is consistent with the motion direction of the camera corresponding to the start time period of the second video, so that any two adjacent videos can be switched at Visually smooth switching, the edited video has better viewing.
  • the motion direction of the camera corresponding to the end time period of the first video is consistent with the motion direction of the camera corresponding to the start time period of the second video, including: the motion vector corresponding to the first video and the second video
  • the angle between the motion vectors corresponding to the videos is less than the angle threshold and the ratio of the modulus length of the motion vector corresponding to the first video to the modulus length of the motion vector corresponding to the second video is less than the proportional threshold.
  • the motion direction of the camera corresponding to the end time period of the first video is consistent with the motion direction of the camera corresponding to the start time period of the second video.
  • the photographing device is installed on a movable platform through a pan/tilt, the photographing device is provided with an inertial measurement unit, and the acquisition of the corresponding one of the multiple videos in the initial time period
  • the motion state of the shooting device and the motion state of the shooting device corresponding to the end time period include: acquiring the measurement data of the inertial measurement unit and the attitude angle of the pan/tilt to determine whether each video in the plurality of videos is The movement state of the photographing device corresponding to the start time period and the movement state of the photographing device corresponding to the end time period.
  • the position of the camera can be obtained from the measurement data of the inertial measurement unit, and the posture of the camera can be obtained from the attitude angle of the pan/tilt.
  • the motion vector of the camera during the initial period of the video it can be obtained in the initial period of the video.
  • the position and posture of the camera at the start time and the position and posture of the camera at the end of the start time period of the video According to the position of the shooting device at the start time of the start time period of the video and the position of the shooting device at the end time of the start time period of the video, the displacement amount of the shooting device during the start time period of the video is calculated.
  • the amount of change in the posture of the shooting device during the start time period of the video is calculated.
  • the motion vector of the shooting device in the initial time period of the video is calculated. In the same way, the motion vector of the camera at the end of the video can be calculated.
  • the motion parameters of the shooting device at multiple times adjacent to the start time of the start time period of the video and the end of the start time period of the neighboring video can be obtained.
  • the motion parameters of the device are captured at multiple moments in time.
  • a motion vector can be calculated, so that multiple motion vectors can be calculated, and the calculation can be The average value of the multiple motion vectors is used as the motion vector of the camera in the initial time period of the video.
  • the motion vector of the camera at the end of the video can be calculated.
  • FIG. 2 shows a schematic diagram of a principle of searching for a video sequence.
  • the four original videos obtained by shooting are video 1, video 2, video 3, and video 4.
  • video 1, video 2, video 3, and video 4 are all videos obtained by the drone surrounding the target object for surround shooting.
  • the moving direction of the camera at the end time period of the video A1 is consistent with the moving direction of the camera at the start time of the video B2.
  • the moving direction of the camera at the end time period of the video B2 is consistent with the moving direction of the camera at the start time of the video C3.
  • the moving direction of the camera at the end time period of the video C3 is consistent with the moving direction of the camera at the start time of the video D4.
  • A1, B2, C3, and D4 can form a video sequence.
  • the order of the videos is A1, B2, C3, and D4.
  • the moving direction of the camera at the end time period of the video A1 is consistent with the moving direction of the camera at the start time of the video C2.
  • the motion direction of the camera at the end time period of the video C2 is consistent with the motion direction of the camera at the start time period of the video B3.
  • the moving direction of the camera at the end time period of the video B3 is consistent with the moving direction of the camera at the start time of the video D4.
  • the order of the video is A1, D2, B3, and C4.
  • the motion direction of the camera at the end time period of the video A1 is consistent with the motion direction of the camera at the start time period of the video D2.
  • the moving direction of the camera at the end time period of the video D2 is consistent with the moving direction of the camera at the start time of the video B3.
  • the motion direction of the camera at the end time period of the video B3 is consistent with the motion direction of the camera at the start time period of the video C4.
  • the motion direction of the shooting device corresponding to the end time period of the first video in the video sequence is the same as the motion direction of the shooting device corresponding to the start time period of the second video, which can make any two adjacent
  • the video switching is a visually smooth switching, and the clipped video obtained by splicing the videos in the video sequence has better viewing.
  • the camera may also be installed in an autonomous vehicle, a handheld stabilizer, and the like.
  • a handheld stabilizer such as a handheld pan/tilt
  • multiple videos obtained by the shooting device can be obtained, and the motion state of the shooting device corresponding to each video in the multiple videos can be obtained, and the shooting according to the corresponding shooting of each video
  • the motion state of the device sort multiple videos to determine the video sequence.
  • the movement state of the movable platform corresponding to each video in the multiple videos can also be obtained, and the movement state of the movable platform corresponding to each video can be adjusted according to the movement state of the movable platform corresponding to each video.
  • Multiple videos are sorted to determine the video sequence.
  • the movement state of the movable platform includes one or more of the movement direction, movement trajectory, movement height, and speed of the movable platform.
  • Step 104 Generate a clipped video based at least in part on the video sequence.
  • one or more video sequences may be provided to the user, and the user selects the video sequence used to generate the clipped video from all the video sequences provided to the user. For each video sequence selected by the user for generating the clipped video, the videos in the video sequence are spliced to obtain the clipped video, and then all the obtained clipped videos are provided to the user. It is also possible to splice the videos in the video sequence for each video sequence to obtain a clipped video, and then provide all the obtained clipped videos to the user.
  • generating the clipped video based at least in part on the video sequence includes: obtaining a rhythm point sequence; and generating the clipped video according to the rhythm point sequence and the video sequence.
  • the video sequence found and the music used to generate the clip video can be used to generate the clip video, the music used to generate the clip video or the music used to generate the clip video in the music provided to the user.
  • One part is used as the background music of the clipped video, so that the clipped video has background music.
  • the user may select the music used to generate the clip video from a plurality of music provided to the user. Then, a rhythm point sequence composed of rhythm points in the music used to generate the clip video can be acquired. According to the rhythm point sequence and the video sequence, the clip video can be generated.
  • the rhythm points in the music used to generate the clip video may be rhythm points that appear periodically.
  • the rhythm points in the sequence of rhythm points may also be rhythm points that appear periodically.
  • the rhythm points in the sequence of rhythm points may be drum points. It can extract the drum frequency band in the audio signal of the music used to generate the clip video, and detect the periodically appearing drum beats in the music used to generate the clip video according to the spectral characteristics and amplitude of each frame signal in the drum frequency band. , Determine the moment when the periodically appearing drum beats appear in the music used to generate the clipped video.
  • each video sequence may correspond to one or more rhythm point sequences.
  • a clip video may be generated according to the video sequence and the rhythm point sequence.
  • each video in the video sequence may correspond to two rhythm points in the rhythm point sequence corresponding to the video sequence.
  • all rhythm points in the music used to generate the clip video may be detected first.
  • the number of rhythm points in the rhythm point sequence may be determined according to the number of videos in the video sequence. Then, a determined number of rhythm points can be selected from all the rhythm points, and the selected rhythm points form a rhythm point sequence.
  • the video may be compressed so that the duration of the video is equal to its duration.
  • the time interval between two corresponding rhythm points When the duration of the video is less than the time interval between the two corresponding rhythm points, the video can be stretched so that the duration of the video is equal to its corresponding The time interval between two rhythm points. Therefore, for each video in the video sequence, the duration of the video is equal to the time interval between two corresponding rhythm points.
  • the rhythm point that appears later in the music used to generate the clipped video can be used as the difference between the video and the video.
  • a video sequence includes: video A1, video B2, video C3, and video D4.
  • the order of the videos in the video sequence is video A1, video B2, video C3, and video D4.
  • the rhythm point sequence corresponding to the video sequence includes: the rhythm point in the music used to generate the clip video 1, the rhythm point in the music used to generate the clipped video 2, the rhythm point in the music used to generate the clipped video, and the rhythm point in the music used to generate the clipped video.
  • the rhythm points in the rhythm point sequence corresponding to the video sequence appear sequentially in the music used to generate the clipped video, that is, the order of appearance is the rhythm point 1, the rhythm point 2, the rhythm point. 3.
  • the rhythm point 4 the rhythm point 5.
  • the rhythm points in the sequence of rhythm points do not appear sequentially in the music used to generate the clipped video.
  • the two rhythm points corresponding to the video A1 are the rhythm point 1 and the rhythm point 2, and the time interval between the rhythm point 1 and the rhythm point 2 is equal to the duration of the video A1.
  • Rhythm point 2 is a rhythm point associated with the switch between video A1 and video B2.
  • the two rhythm points corresponding to the video B2 are the rhythm point 2 and the rhythm point 3.
  • the time interval between the rhythm point 2 and the rhythm point 3 is equal to the duration of the video B2.
  • the tempo point 3 is a tempo point associated with the switching between the video B2 and the video C3.
  • the two rhythm points corresponding to the video C3 are the rhythm point 3 and the rhythm point 4, and the time interval between the rhythm point 3 and the rhythm point 4 is equal to the duration of the video C3.
  • Rhythm point 4 is a tempo point associated with switching between video C3 and video D4.
  • the two rhythm points corresponding to the video D4 are the rhythm point 4 and the rhythm point 5.
  • the time interval between the rhythm point 4 and the rhythm point 5 is equal to the duration of the video D4.
  • rhythm point sequences corresponding to one video sequence there may be multiple rhythm point sequences corresponding to one video sequence. For each video sequence, one or more rhythm point sequences corresponding to the video sequence can be determined.
  • the video sequence includes A1, B2, C3, and D4.
  • the music used to generate the edited video includes: Rhythm Point 1, Rhythm Point 2, Rhythm Point 3, Rhythm Point 4, Rhythm Point 5, Rhythm Point 6, Rhythm Point 7, Rhythm Point 8, Rhythm Point 9, and Rhythm Point 10.
  • the rhythm point sequence corresponding to the video sequence including A1, B2, C3, D4 can be composed of rhythm point 1, rhythm point 2, rhythm point 3, rhythm point 4, and rhythm point 5, or include videos of A1, B2, C3, and D4
  • the sequence of rhythm points corresponding to the sequence can be composed of rhythm point 6, rhythm point 7, rhythm point 8, rhythm point 9, and rhythm point 10.
  • the thumbnail of the video in the video sequence, the identification of the rhythm point in the rhythm point sequence corresponding to the video sequence, and the rhythm point appear in the music used to generate the clip video.
  • the moment of time and other content are presented in the video editing interface to users who need to obtain the clipped video.
  • the user chooses whether to use the video sequence and the rhythm point sequence corresponding to the video sequence to generate the clipped video.
  • the clipped video can be generated.
  • each video in the video sequence is used as a video in the clip video.
  • the order of the videos in the clipped video is consistent with the order of the videos in the video sequence.
  • a music segment located between two rhythm points corresponding to the video is used as a segment of the background music of the clipped video.
  • a music segment located between two rhythm points corresponding to the video in the music used to generate the clip video is played.
  • each video in the clipped video has a start moment on the playback timeline and an end moment on the playback timeline.
  • the start moment of the video on the playback timeline can refer to the moment when the video starts to be played on the playback timeline when the clip video is played
  • the end moment of the video on the playback timeline can be It refers to the moment when the video is played on the playback timeline when the clip video is played.
  • the end time of the video with the previous position is the start time of the video with the subsequent position.
  • each rhythm point in the sequence of rhythm points corresponding to the video sequence has an appearance moment on the playback time axis.
  • the duration of the video is equal to the time interval between two rhythm points corresponding to the video.
  • the rhythm point that appears later on the playback time axis is the rhythm point related to the next video switching from the video to the video.
  • the start time of the video on the playback timeline is the same as the appearance time of the first rhythm point on the playback timeline of the two rhythm points corresponding to the video on the playback timeline.
  • the video is on the playback timeline.
  • the end time on the above is the same as the appearance time of the rhythm point on the playback time axis of the two rhythm points corresponding to the video that is later on the playback time axis.
  • the start time of the next video of the video on the play time axis is the same as the appearance time of the rhythm point on the play time axis of the two rhythm points corresponding to the video that is later than the appearance time on the play time axis.
  • the video is played at the beginning of the video on the playback timeline, in other words, the rhythm point that appears earlier on the playback timeline among the two rhythm points corresponding to the video
  • start playing the video Play the video at the end time of the video on the playback timeline, switch from the video to the next video, and start playing the next video of the video, in other words, in the playback time of the two rhythm points corresponding to the video
  • the appearance time of the rhythm point on the playback time axis at the later time of appearance on the axis is switched from the video to the next video, and the next video of the video is started to be played. Since the motion feature corresponding to the video matches the motion feature of the next video of the video, when switching from the video to the next video, visually smooth switching can be performed.
  • FIG. 3 shows a schematic diagram of the effect of the association relationship between the video and the rhythm point in the video sequence on the time sequence.
  • FIG. 3 video A1, video B2, video C3, and video D4 in a video sequence are shown.
  • the order of the videos in the video sequence is video A1, video B2, video C3, and video D4.
  • the rhythm point sequence corresponding to the video sequence includes: the rhythm point in the music used to generate the clip 1, the rhythm point in the music used to generate the clip 2, the rhythm point in the music used to generate the clip 3, and the rhythm point in the music used to generate the clip.
  • Rhythm point 4 in the music used to generate the clip.
  • Rhythm point 5 in the music used to generate the clip.
  • the order in which the rhythm points in the rhythm point sequence corresponding to the video sequence appear in the music used to generate the clipped video is the rhythm point 1, the rhythm point 2, the rhythm point 3, the rhythm point 4, and the rhythm point 5.
  • the two rhythm points corresponding to the video A1 are the rhythm point 1 and the rhythm point 2, and the time interval between the rhythm point 1 and the rhythm point 2 is equal to the duration of the video A1.
  • the rhythm point 2 is a rhythm point associated with the switch between video A1 and video B2.
  • the two rhythm points corresponding to the video B2 are the rhythm point 2 and the rhythm point 3.
  • the time interval between the rhythm point 2 and the rhythm point 3 is equal to the duration of the video B2.
  • the rhythm point 3 is a rhythm point associated with the switch between video B2 and video C3.
  • the two rhythm points corresponding to the video C3 are the rhythm point 3 and the rhythm point 4, and the time interval between the rhythm point 3 and the rhythm point 4 is equal to the duration of the video C3.
  • the rhythm point 4 is a rhythm point associated with switching between the video C3 and the video D4.
  • the two rhythm points corresponding to the video D4 are the rhythm point 4 and the rhythm point 5.
  • the time interval between the rhythm point 4 and the rhythm point 5 is equal to the duration of the video D4.
  • the generated clipped video includes: the video sequence and the background music of the clipped video.
  • the background music of the clip video includes: music segment 1 located in the time period between the time when the rhythm point 1 appears in the music used to generate the clip and the time when the rhythm point 2 appears in the music used to generate the clip.
  • Music segment 2 located in the time period between the time when the rhythm point 2 appears in the music used to generate the clip and the time when the rhythm point 3 appears in the music used to generate the clip 2, is located at the rhythm point 3
  • the time axis shown represents the playback time axis when the clip video is played.
  • the appearance time of rhythm point 1 on the playback time axis can be time 0 on the playback time axis, and the appearance time of other rhythm points on the playback time axis can also be determined.
  • the appearance time of rhythm point 1 on the playback timeline can also be set by the user who needs to obtain the edited video. According to the appearance time of rhythm point 1 on the playback timeline set by the user, other rhythm points are on the playback timeline. The moment of appearance can also be determined.
  • the duration of video A1 is equal to the time interval between rhythm point 1 and rhythm point 2.
  • the start time of video A1 on the play time axis is the same as the appearance time of rhythm point 1 on the play time axis, and the start time of video A1 on the play time axis is time 0 on the play time axis.
  • the ending time of video A1 on the playback time axis is the same as the appearance time of rhythm point 2 on the playback time axis.
  • the duration of video B2 is equal to the time interval between rhythm point 2 and rhythm point 3.
  • the start time of video B2 on the play time axis is the same as the appearance time of rhythm point 2 on the play time axis
  • the end time of video B2 on the play time axis is the same as the appearance time of rhythm point 3 on the play time axis.
  • the duration of video C3 is equal to the time interval between rhythm point 3 and rhythm point 4.
  • the start time of video C3 on the play time axis is the same as the appearance time of rhythm point 3 on the play time axis
  • the end time of video C3 on the play time axis is the same as the appearance time of rhythm point 4 on the play time axis.
  • the duration of video D4 is equal to the time interval between rhythm point 4 and rhythm point 5.
  • the start time of video D4 on the play time axis is the same as the appearance time of rhythm point 4 on the play time axis, and the end time of video D4 on the play time axis is the appearance time of rhythm point 5 on the play time axis.
  • the video A1 is first played, and the appearance of the rhythm point 1 on the playback time axis is the time on the playback time axis.
  • the music segment 1 is played.
  • stop playing video A1 switch from video A1 to video B2, and continue playing video B2.
  • the music segment 2 is played.
  • stop playing video B2 When reaching the time when the rhythm point 3 appears on the playback time axis, stop playing video B2, switch from video B2 to video C3, and continue playing video C3. In the process of playing the video C3, while the image in the video C3 is presented to the user, the music segment 3 is played. When it reaches the time when the rhythm point 4 appears on the playback time axis, stop playing video C3, switch from video C3 to video D4, and continue playing video D4. In the process of playing the video D4, the music segment 4 is played while the image in the video D4 is presented to the user.
  • the motion feature corresponding to video A1 matches the motion feature corresponding to video B2, the motion feature corresponding to video B2 matches the motion feature corresponding to video C3, and the motion feature corresponding to video C3 matches the motion feature corresponding to video D4. Therefore, any one of switching from video A1 to video B2, switching from video B2 to video C3, or switching from video C3 to video D4, the video switching completed at the moment when the corresponding rhythm point appears is visually smooth. Switch.
  • generating a clipped video according to the rhythm point sequence and the video sequence includes: determining whether the video sequence meets a preset condition according to the rhythm point sequence; when the preset condition is satisfied, performing a video sequence on each video in the video sequence Splicing to obtain a clipped video; when the preset condition is not met, adjust the starting point or end point of the video in the video sequence to obtain an adjusted video, and splicing the adjusted video to obtain the clipped video.
  • the preset condition may be: for each video in the video sequence, the time interval between the first rhythm point on the playback time axis and the start point of the video among the two rhythm points corresponding to the video is less than the time Threshold and the time interval between the rhythm point that appears later on the playback time axis and the end point of the video is less than the time threshold.
  • the time interval between the rhythm point before the appearance time on the playback time axis and the start point of the video can refer to the time when the rhythm point before the appearance time on the playback time axis appears on the playback time axis and the video playback time The time difference between the start moments on the axis.
  • the time interval between the rhythm point later in the appearance time on the playback time axis and the end point of the video may refer to the time when the rhythm point later in the appearance time on the playback time axis appears on the playback time axis and the end point of the video.
  • the time difference between the ending moments on the playback timeline may refer to the time when the rhythm point later in the appearance time on the playback time axis appears on the playback time axis and the end point of the video.
  • each video in the video sequence can be spliced to obtain a clipped video.
  • the music segment between two rhythm points corresponding to the video can be used as a segment of music corresponding to the video in the background music of the clipped video.
  • the video sequence does not meet the preset conditions: the first rhythm point of the two rhythm points corresponding to the video and the starting point of the video that appear earlier on the playback time axis
  • the time interval of is greater than the time threshold and/or the time interval between the rhythm point of the two rhythm points corresponding to the video that appears later on the playback time axis and the end point of the video is greater than the time threshold.
  • the video that meets the adjustment condition is determined as the video that needs to be adjusted in the video sequence. For each video that needs to be adjusted, adjust the start point or end point of the video that needs to be adjusted, that is, the start time of the video that needs to be adjusted on the playback timeline or the end time on the playback timeline in the playback timeline On the position to get the adjusted video.
  • the adjusted video obtained after adjusting the video satisfies the two rhythm points corresponding to the video, the rhythm point that appears earlier on the playback time axis and the start point of the video
  • the time interval of is less than the time threshold, and the time interval between the rhythm point that appears later on the playback time axis and the end point of the video is less than the time threshold.
  • adjusting the start point or end point of the video to obtain the adjusted video includes: cropping, compressing, or stretching the video to adjust the start point or end point of the video to obtain the adjusted video.
  • the video that needs to be adjusted can be cropped to adjust the start point or end point of the video to obtain the adjusted video. It can be compressed to adjust the start point or end point of the video to get the adjusted video. You can stretch the video that needs to be adjusted to get the adjusted video.
  • the preset condition includes: the time interval between the start point or end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to a preset time threshold.
  • the video in the video sequence does not specifically refer to a certain video.
  • the preset conditions include the time interval between the start point or end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to the preset time threshold If the time interval between the start point or end point of any video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to the preset time threshold, the preset condition is met.
  • An embodiment of the present application also provides a terminal device.
  • the terminal device includes a processor, and the processor is configured to: obtain a plurality of videos, which are captured by a shooting device; and obtain a video corresponding to each of the plurality of videos.
  • the motion state of the shooting device; according to the motion state of the shooting device corresponding to each video, the multiple videos are sorted to determine a video sequence; and a clip video is generated based at least in part on the video sequence.
  • the processor when the processor obtains the motion state of the shooting device corresponding to each video in the plurality of videos, it is specifically configured to: obtain the start time of each video in the plurality of videos. The movement state of the photographing device corresponding to the segment and the movement state of the photographing device corresponding to the end time period.
  • the processor when the processor acquires the motion state of the photographing device corresponding to the start time period of each video in the plurality of videos and the motion state of the photographing device corresponding to the end time period, It is specifically used to: obtain the video frame of the start time period and the video frame of the end time period in each video; determine the video frame of each video according to the video frame of the start time period and the video frame of the end time period.
  • the processor determines the motion of the photographing device corresponding to the start time period of each video according to the video frame of the start time period and the video frame of the end time period.
  • the state and the motion state of the photographing device correspond to the end time period, they are specifically used to: obtain the feature points of the video frame of the start time period; perform feature points on the feature points of the video frame of the start time period Matching to obtain the motion state of the photographing device corresponding to the start time period; obtain the feature points of the video frame of the end time period; perform feature point matching on the feature points of the video frame of the end time period to obtain The motion state of the photographing device corresponding to the end time period.
  • the photographing device is installed on a movable platform through a pan/tilt, and the photographing device is provided with an inertial measurement unit; the processor acquires each of the multiple videos corresponding to the start time period.
  • the motion state of the photographing device and the motion state of the photographing device corresponding to the end time period are specifically used to: obtain the measurement data of the inertial measurement unit and the attitude angle of the pan/tilt to determine the The motion state of the shooting device corresponding to each video in the start time period and the motion state of the shooting device corresponding to the end time period of each video in the plurality of videos.
  • the motion state of the shooting device corresponding to the end period of the first video in the video sequence matches the motion state of the shooting device corresponding to the start period of the second video
  • the first The video and the second video are videos that are adjacent in time sequence in the video sequence.
  • the motion state of the shooting device corresponding to the end time period of the first video in the video sequence matches the motion state of the shooting device corresponding to the start time period of the second video, including:
  • the movement direction of the photographing device corresponding to the end time period of the first video is consistent with the movement direction of the photographing device corresponding to the start time period of the second video.
  • the movement direction of the shooting device corresponding to the end time period of the first video is consistent with the movement direction of the shooting device corresponding to the start time period of the second video, including: the first video corresponds to The angle between the motion vector corresponding to the second video and the motion vector corresponding to the second video is less than the angle threshold and the length of the modulus of the motion vector corresponding to the first video and the length of the modulus of the motion vector corresponding to the second video The ratio is less than the ratio threshold.
  • the processor is further configured to: obtain multiple original videos; and divide the multiple original videos to obtain the multiple videos.
  • two videos that are adjacent in time sequence in the video sequence belong to different original videos.
  • the processor when the processor generates a clipped video based at least in part on the video sequence, it is specifically configured to: obtain a rhythm point sequence; and generate a clipped video according to the rhythm point sequence and the video sequence.
  • the method when the processor generates a clipped video according to the rhythm point sequence and the video sequence, includes: determining whether the video sequence satisfies a preset condition according to the rhythm point sequence; When the video sequence meets a preset condition, splicing each video in the video sequence to obtain the clipped video; when the video sequence does not meet the preset condition, adjust the starting point of the video in the video sequence Or, the adjusted video is obtained at the end point, and the adjusted video is spliced to obtain the clipped video.
  • the preset condition includes: a time interval between a start point or an end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to a preset time threshold.
  • the processor when the processor adjusts the start point or end point of the video to obtain an adjusted video, it is specifically configured to: perform cropping, compression, or stretching processing on the video to adjust the video The start point or end point is the adjusted video.
  • the rhythm points in the sequence of rhythm points are drums that appear periodically.
  • the movement state of the photographing device includes one or more of the movement direction, movement trajectory, movement speed, and height of the photographing device.
  • the camera is provided on a movable platform
  • the movable platform includes a drone, an autonomous vehicle, and a handheld stabilizer.
  • FIG. 4 shows a schematic structural diagram of a terminal device that can implement the method provided in the embodiments of the present application.
  • the terminal device includes a processor 410, a computer program product or computer readable medium in the form of a memory 420, and a display screen 430.
  • the memory 420 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the memory 420 has a storage space for executing program codes of any method steps in the above methods.
  • the storage space for the program code may include various program codes respectively used to implement various steps in the above method.
  • These program codes can be read from or written into one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are usually portable or fixed storage units.
  • the storage unit may have storage segments, storage spaces, etc., arranged similarly to the memory 420.
  • the program code can be compressed in an appropriate form, for example.
  • the storage unit includes computer-readable codes, that is, codes that can be read by, for example, a processor such as 410, which, when run by a terminal device, cause the terminal device to perform each step in the method described above.
  • the various component embodiments of the present application may be implemented by hardware, or by software modules running on one or more processors, or by a combination of them.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the terminal devices or remote control devices according to the embodiments of the present application.
  • This application can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein.
  • Such a program for realizing the present application may be stored on a computer-readable medium, or may have the form of one or more signals.
  • Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
  • any reference signs placed between parentheses should not be constructed as a limitation to the claims.
  • the word “comprising” does not exclude the presence of elements or steps not listed in the claims.
  • the word “a” or “an” preceding an element does not exclude the presence of multiple such elements.
  • the application can be realized by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims that list several devices, several of these devices may be embodied in the same hardware item.
  • the use of the words first, second, and third, etc. do not indicate any order. These words can be interpreted as names.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

Embodiments of the present application provide a video editing method and a terminal apparatus. The method comprises: acquiring multiple videos captured by a capturing device; acquiring a motion state of the capturing device corresponding to each of the videos of the multiple videos; ordering the multiple videos according to the motion state of the capturing device corresponding to each of the videos to determine a video sequence; and generating an edited video at least partially employing the video sequence. The invention simplifies operations of video editing for users, and provides an automatically generated edited video to a user. In addition, the invention determines a video sequence according to a motion state of a capturing device corresponding to a video, such that an edited video provided to a user has an improved viewing effect, thereby improving the editing result.

Description

视频剪辑方法及终端设备Video editing method and terminal equipment 技术领域Technical field
本申请涉及视频处理领域,尤其涉及一种视频剪辑方法及终端设备。This application relates to the field of video processing, and in particular to a video editing method and terminal equipment.
背景技术Background technique
用户在获取到视频之后,经常有对视频进行剪辑,得到剪辑视频的需求。目前,通常采用的对视频进行剪辑方式为:由用户从所有视频中选取出用于生成剪辑视频的视频并且由用户确定选取出的视频的顺序。After the user obtains the video, he often needs to edit the video to obtain the edited video. At present, a commonly used way of editing videos is: the user selects a video used to generate the clipped video from all videos, and the user determines the order of the selected videos.
一方面,由于需要用户自己中选取出用于生成剪辑视频的视频,造成在对视频进行剪辑的过程中用户需要进行繁琐的操作,另一方面,用户自己确定选取的视频的顺序,由于用户的判断能力有限,难以对剪辑视频是否可以具有较好的观赏效果进行准确的判断,剪辑效果不佳。On the one hand, because the user needs to select the video used to generate the edited video, the user needs to perform cumbersome operations in the process of editing the video. On the other hand, the user determines the order of the selected video by himself. The judgment ability is limited, it is difficult to accurately judge whether the edited video can have a good viewing effect, and the editing effect is not good.
发明内容Summary of the invention
本申请实施例提供了视频剪辑方法、终端设备,可以对视频进行自动排序进而生成剪辑视频。The embodiments of the present application provide a video editing method and a terminal device, which can automatically sort videos to generate a clipped video.
第一方面,本申请实施例提供了视频剪辑方法,该方法包括:In the first aspect, an embodiment of the present application provides a video editing method, which includes:
获取多个视频,所述多个视频由拍摄装置拍摄得到;Acquiring multiple videos, the multiple videos being captured by a shooting device;
获取所述多个视频中每个视频对应的所述拍摄装置的运动状态;Acquiring the motion state of the shooting device corresponding to each video in the plurality of videos;
根据所述每个视频对应的所述拍摄装置的运动状态,对所述多个视频进行排序以确定视频序列;Sorting the plurality of videos to determine a video sequence according to the motion state of the shooting device corresponding to each video;
至少部分的基于所述视频序列,生成剪辑视频。Based at least in part on the video sequence, a clipped video is generated.
第二方面,本申请实施例提供了终端设备,该终端设备包括处理器,所述处理器用于:In the second aspect, an embodiment of the present application provides a terminal device, the terminal device includes a processor, and the processor is configured to:
获取多个视频,所述多个视频由拍摄装置拍摄得到;Acquiring multiple videos, the multiple videos being captured by a shooting device;
获取所述多个视频中每个视频对应的所述拍摄装置的运动状态;Acquiring the motion state of the shooting device corresponding to each video in the plurality of videos;
根据所述每个视频对应的所述拍摄装置的运动状态,对所述多个视频进行排序以确定视频序列;Sorting the plurality of videos to determine a video sequence according to the motion state of the shooting device corresponding to each video;
至少部分的基于所述视频序列,生成剪辑视频。Based at least in part on the video sequence, a clipped video is generated.
本申请实施例通过自动根据视频对应的拍摄装置的运动状态,确定视频序列,从而,根据视频序列自动生成剪辑视频。一方面,简化了用户在对视频进行剪辑时的操作,可以快速地生成剪辑视频。另一方面,根据视频对应的拍摄装置的状态,确定视频序列,使得提供给用户的剪辑视频具有较好的观赏性,提升剪辑效果。In the embodiment of the present application, a video sequence is determined automatically according to the motion state of the shooting device corresponding to the video, so that a clipped video is automatically generated according to the video sequence. On the one hand, it simplifies the operation of the user when editing the video, and can quickly generate the edited video. On the other hand, the video sequence is determined according to the state of the shooting device corresponding to the video, so that the edited video provided to the user has a better viewing ability and improves the editing effect.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of this application. In order to understand the technical means of this application more clearly, it can be implemented in accordance with the content of the specification, and in order to make the above and other purposes, features and advantages of this application more obvious and understandable. , The following specifically cite the specific implementation of this application.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1示意性地示出了本申请实施例提供的视频剪辑方法的流程图;Fig. 1 schematically shows a flowchart of a video editing method provided by an embodiment of the present application;
图2示意性地示出了查找视频序列的一个原理示意图;Figure 2 schematically shows a schematic diagram of a principle of searching for a video sequence;
图3示意性地示出了视频序列中的视频和节奏点在时序上的关联关系的效果示意图;FIG. 3 schematically shows the effect diagram of the association relationship between the video and the rhythm point in the video sequence in the time sequence;
图4示意性地示出了终端设备的结构示意图。Fig. 4 schematically shows a structure diagram of a terminal device.
具体实施例Specific embodiment
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请实施例提供的视频剪辑方法可以向用户提供自动生成的具有较好的观赏性的剪辑视频。以无人机为例,用户控制无人机在不同的环境(比如海边、山顶、操场、湖畔)飞行,例如环绕兴趣点飞行并且进行拍摄,得到视频A、视频B、视频C、视频D等多个视频。The video editing method provided in the embodiments of the present application can provide users with automatically generated edited videos with better viewing quality. Taking drones as an example, the user controls the drone to fly in different environments (such as the seaside, the top of the mountain, the playground, the lakeside), such as flying around the point of interest and shooting to get Video A, Video B, Video C, Video D, etc. Multiple videos.
通过本申请实施例提供的视频剪辑方法,可以确定视频序列。例如,分别将每一个视频划分为多段视频。对视频A进行划分得到视频A1、视频A2、视频A3、视频A4,对视频B进行划分得到视频B1、视频B2、视频B3、视频B4。对视频C进行划分得到视频C1、视频C2、视频C3、视频C4。对视频D进行划分得到视频D1、视频D2、视频D3、视频D4。可以根据对于通过划分得到的所有视频中的每个视频对应的拍摄装置的运动状态,确定A1、B2、C3、D4的视频序列、或者A1、C2、B3、D4的视频序列等视频序列。对于每一个视频序列,可以对视频序列中的所有视频进行拼接,得到剪辑视频。在用户需要对通过拍摄得到的视频进行剪辑时,可以向用户提供自动生成的所有剪辑视频。通过本申请实施例提供的视频剪辑方法确定的视频序列中的任意两个相邻的视频对应的拍摄装置的运动状态匹配,如此可以使得自动生成的剪辑视频具有较好的观赏性,将自动生成的具有较好的观赏性的剪辑视频提供给用户,可以使用户避免手动剪辑的繁琐操作。Through the video editing method provided in the embodiments of the present application, the video sequence can be determined. For example, each video is divided into multiple videos. Video A is divided to obtain video A1, video A2, video A3, and video A4, and video B is divided to obtain video B1, video B2, video B3, and video B4. The video C is divided to obtain video C1, video C2, video C3, and video C4. The video D is divided to obtain video D1, video D2, video D3, and video D4. The video sequences of A1, B2, C3, D4, or video sequences of A1, C2, B3, D4, etc. may be determined according to the motion state of the shooting device corresponding to each video in all the videos obtained by division. For each video sequence, all videos in the video sequence can be spliced to obtain a clipped video. When the user needs to edit the video obtained by shooting, it can provide the user with all the clipped videos that are automatically generated. The motion states of the shooting devices corresponding to any two adjacent videos in the video sequence determined by the video editing method provided by the embodiments of the present application are matched, so that the automatically generated clipped video has better viewing ability and will be automatically generated The edited video with good viewing quality is provided to users, which can enable users to avoid the tedious operation of manual editing.
请参考图1,其示出了本申请实施例提供的视频剪辑方法的流程图。该方法包括以下步骤:Please refer to FIG. 1, which shows a flowchart of a video editing method provided by an embodiment of the present application. The method includes the following steps:
步骤101,获取多个视频,多个视频由拍摄装置拍摄得到。Step 101: Obtain multiple videos, and the multiple videos are captured by a shooting device.
在本申请中,获取到的多个视频为由拍摄装置在运动过程中拍摄的视频。In this application, the multiple acquired videos are videos taken by the camera during exercise.
在一些实施例中,获取多个视频之前,还包括:获取多个原始视频;对多个原始视频进行划分,以得到多个视频。In some embodiments, before acquiring multiple videos, the method further includes: acquiring multiple original videos; and dividing the multiple original videos to obtain multiple videos.
在一些实施例中,在获取多个视频之前,可以首先获取多个原始视频。当对多个原始视频进行划分时,可以将每一个原始视频分别划分为多个视频。分别将每一个原始视频划分为多个视频之后,通过划分得到的所有视频组成获取到的多个视频。In some embodiments, before acquiring multiple videos, multiple original videos may be acquired first. When multiple original videos are divided, each original video can be divided into multiple videos. After each original video is divided into multiple videos, all the videos obtained through the division constitute the multiple obtained videos.
步骤102,获取多个视频中每个视频对应的拍摄装置的运动状态。Step 102: Acquire the motion state of the shooting device corresponding to each video in the multiple videos.
在一些实施例中,拍摄装置设置于可移动平台,可移动平台包括无人机、自动驾驶车辆、手持稳定器。In some embodiments, the camera is set on a movable platform, and the movable platform includes a drone, an autonomous vehicle, and a handheld stabilizer.
在一些实施例中,拍摄装置的运动状态包括所述拍摄装置的运动方向、运动轨迹、运动速度、高度中的一个或多个。In some embodiments, the movement state of the photographing device includes one or more of the movement direction, movement trajectory, movement speed, and height of the photographing device.
在一些实施例中,获取多个视频中每个视频对应的拍摄装置的运动状态,包括:获取多个视频中每个视频在起始时间段对应的拍摄装置的运动状态和结束时间段对应的拍摄装置的运动状态。In some embodiments, acquiring the motion state of the shooting device corresponding to each video in the plurality of videos includes: acquiring the motion state of the shooting device corresponding to each video in the multiple videos at the start time period and the motion state of the shooting device corresponding to the end time period. The motion state of the camera.
在一些实施例中,对于一个视频,该视频的起始时间段可以为位于该视频的拍摄时间段内的、以该视频的拍摄时间段的开始时刻作为开始时刻的一定时长的时间段,该视频的结束时间段可以为位于该视频的拍摄时间段内的、以邻近该视频的拍摄时间段的结束时刻的时刻作为开始时刻并且以该视频的拍摄时间段的结束时刻作为结束时刻的一定时长的时间段。In some embodiments, for a video, the start time period of the video may be a certain time period within the shooting time period of the video with the start time of the shooting time period of the video as the start time. The end time period of the video may be a certain length of time within the shooting time period of the video, with the time adjacent to the end time of the shooting time period of the video as the start time and the end time of the shooting time period of the video as the end time. Time period.
在一些实施例中,获取多个视频中每个视频在起始时间段对应的拍摄装置的运动状态和结束时间段对应的拍摄装置的运动状态,包括:获取每个视频中起始时间段的视频帧和结束时间段的视频帧;根据起始时间段的视频帧和结束时间段的视频帧,确定每个视频在起始时间段对应的拍摄装置的运动状态和结束时间段对应的拍摄装置的运动状态。In some embodiments, obtaining the motion state of the shooting device corresponding to the start time period and the motion state of the shooting device corresponding to the end time period of each video in the multiple videos includes: obtaining the start time period of each video Video frame and video frame of the end time period; according to the video frame of the start time period and the video frame of the end time period, determine the motion state of the shooting device corresponding to each video in the start time period and the shooting device corresponding to the end time period The state of exercise.
在一些实施例中,对于一个视频,该视频中起始时间段的视频帧为在该视频的起始时间段内通过拍摄得到的视频帧,该视频中结束时间段的视频帧为在该视频的结束时间段通过拍摄得到的视频帧。对于每一个视频,可以根据视频中起始时间段的视频帧,确定视频在起始时间段对应的拍摄装置的运动状态。对于每一个视频,可以根据视频的结束时间段的视频帧,确定视频在结束时间段对应的拍摄装置的运动状态。In some embodiments, for a video, the video frame in the start period of the video is a video frame obtained by shooting during the start period of the video, and the video frame in the end period of the video is the video frame in the video. The end time period of the video frame obtained by shooting. For each video, the motion state of the shooting device corresponding to the video at the start time period can be determined according to the video frame of the start time period in the video. For each video, the motion state of the shooting device corresponding to the video at the end time period can be determined according to the video frame at the end time period of the video.
例如,以视觉里程计(Visual Odometry,简称VO)、即时定位与地图构建(simultaneous localization and mapping,简称SLAM)等方式,对于每一个视频,基于视频中起始时间段的视频帧或结束时间段的视频帧,来估计在起始时间段或结束时间段拍摄装置的运动轨迹,从而,得到描述运动状态的移动方向等信息,获取到视频在起始时间段对应的拍摄装置的运动状态或视频在结束时间段对应的拍摄装置的运动状态。For example, by means of Visual Odometry (VO for short), simultaneous localization and mapping (SLAM for short), etc., for each video, based on the video frame of the start time period or the end time period in the video To estimate the motion trajectory of the camera at the start time period or the end time period, and obtain information such as the movement direction describing the motion state, and obtain the motion state or video of the camera corresponding to the video at the start time period The motion state of the corresponding camera at the end time period.
在一些实施例中,根据起始时间段的视频帧和结束时间段的视频帧,确定每个视频在起始时间段对应的拍摄装置的运动状态和结束时间段对应的拍摄装置的运动状态,包括:获取起始时间段的视频帧的特征点;对起始时间段的视频帧的特征点进行特征点匹配,得到起始时间段对应的拍摄装置的运动状态;获取结束时间段的视频帧的特征点;对结束时间段的视频帧的特征点进行特征点匹配,得到结束时间段对应的拍摄装置的运动状态。In some embodiments, according to the video frame of the start time period and the video frame of the end time period, the motion state of the camera corresponding to each video in the start time period and the motion state of the camera corresponding to the end time period are determined, Including: obtaining the feature points of the video frame in the starting time period; matching the feature points of the video frame in the starting time period to obtain the motion state of the shooting device corresponding to the starting time period; obtaining the video frame in the ending time period Feature points; feature point matching is performed on the feature points of the video frame at the end time period to obtain the motion state of the shooting device corresponding to the end time period.
当计算视频在起始时间段对应的拍摄装置的运动状态或在结束时间段对应的拍摄装置的运动状态时,可以首先获取在视频的起始时间段或在视频的结束时间段内通过拍摄得到的多个视频帧,确定多个视频帧中的每一个视频帧中的特征点。视频帧中的特征点可以为视频帧的角点。可以采用角点检测算法例如FAST(features from accelerated segment test)、SUSAN、Harris operator检测出视频帧的角点。然后,检测每一个视频帧中的与其他的视频帧中的特征点匹配的特征点。根据每一个视频帧中的与其他的视频帧中的特征点匹配的特征点在图像坐标系中的坐标,得到在视频的起始时间段或在视频的结束时间段拍摄装置的运动矢量,从而,得到视频在起始时间段对应的拍摄装置的运动状态或视频在结束时间段对应的拍摄装置的运动状态。When calculating the motion state of the shooting device corresponding to the start time period of the video or the motion state of the shooting device corresponding to the end time period of the video, you can first obtain the start time period of the video or the end time period of the video through shooting. Multiple video frames, determine the feature points in each of the multiple video frames. The feature points in the video frame may be corner points of the video frame. Corner detection algorithms such as FAST (features from accelerated segment test), SUSAN, and Harris operator can be used to detect corners of video frames. Then, the feature points in each video frame that match the feature points in other video frames are detected. According to the coordinates in the image coordinate system of the feature points matching the feature points in other video frames in each video frame, the motion vector of the shooting device at the start time period of the video or at the end time period of the video is obtained, thereby , Get the motion state of the shooting device corresponding to the video at the start time period or the motion state of the shooting device corresponding to the video at the end time period.
在一些实施例中,可以检测每一个视频帧中的与其他的视频帧中的特征点匹配的特征点。然后,可以根据每一个视频帧中的与其他的视频帧中的特征点匹配的特征点在图像坐标系中的坐标,根据每一个视频帧中的与其他的视频帧中的特征点匹配的特征点在图像坐标系中的坐标,对在视频的起始时间段或结束时间段内可移动平台的相机的运动情况进行估计,然后,进一步计算出在视频的起始时间段或在视频的结束时间段拍摄装置的运动矢量,从而,得到视频在起始时间段对应的拍摄装置的运动状态或视频在结束时间段对应的拍摄装置的运动状态。In some embodiments, feature points in each video frame that match feature points in other video frames can be detected. Then, according to the coordinates in the image coordinate system of the feature points in each video frame that match the feature points in other video frames, according to the features in each video frame that match the feature points in other video frames Point the coordinates in the image coordinate system, estimate the movement of the camera of the movable platform during the start time period or end time period of the video, and then further calculate the start time period of the video or the end of the video The motion vector of the shooting device in the time period, thereby obtaining the motion state of the shooting device corresponding to the video at the start time period or the motion state of the shooting device corresponding to the video at the end time period.
可选的,可以对获取到的在起始时间段或结束时间段内通过拍摄得到的多个视频帧中的每一个视频帧分别建立高斯金字塔,对于每一个视频帧的高斯金字塔中的每一层,查找出与其他的视频帧的高斯金字塔中的相应层中的特征点匹配的特征点。对于每一个视频帧,将视频帧的高斯金字塔中的所有层中的与其他的视频帧的高斯金字塔中的相应层中的特征点匹配的特征点均作为视频帧的与其他的视频帧中的特征点匹配的特征点。Optionally, a Gaussian pyramid can be established for each of the multiple video frames obtained by shooting during the start time period or the end time period. For each of the Gaussian pyramids of each video frame Layer, find the feature points that match the feature points in the corresponding layer in the Gaussian pyramid of other video frames. For each video frame, the feature points in all layers in the Gaussian pyramid of the video frame that match the feature points in the corresponding layer in the Gaussian pyramid of other video frames are regarded as the difference between the video frame and other video frames. Feature points that match the feature points.
步骤103,根据每个视频对应的拍摄装置的运动状态,对所述多个视频进行排序以确定视频序列。Step 103: Sort the multiple videos to determine a video sequence according to the motion state of the shooting device corresponding to each video.
在一些实施例中,可以根据获取到的多个视频中的每个视频对应的拍摄装置的运动状态,确定一个或多个视频序列。In some embodiments, one or more video sequences may be determined according to the motion state of the shooting device corresponding to each of the obtained multiple videos.
在一些实施例中,拍摄装置的运动状态可以利用多个参数描述。例如,视频对应的拍摄装置的运动状态包括拍摄装置的运动方向、运动轨 迹、运动速度、高度中的一个或多个。在一个实施例中,当在拍摄视频的过程中拍摄装置的运动轨迹为弧线时,可以确定运动轨迹的起始点和结束点,将起始点朝向结束点的方向作为在拍摄视频的过程中拍摄装置的运动方向。In some embodiments, the motion state of the camera may be described by multiple parameters. For example, the motion state of the camera corresponding to the video includes one or more of the motion direction, trajectory, motion speed, and height of the camera. In one embodiment, when the motion trajectory of the shooting device is an arc during the shooting of the video, the starting point and the end point of the motion trajectory can be determined, and the direction from the starting point to the end point is regarded as the shooting in the process of shooting the video. The direction of movement of the device.
在一些实施例中,视频序列中的任意两个相邻的视频对应的拍摄装置的运动状态匹配。相邻的两个视频对应的拍摄装置的运动状态匹配可以使得剪辑视频具有较好的观赏性。两个视频是否匹配可以根据两个视频满足相应的预设匹配条件确定。In some embodiments, the motion states of the camera corresponding to any two adjacent videos in the video sequence match. Matching the motion states of the shooting devices corresponding to two adjacent videos can make the edited video have better viewing. Whether the two videos match can be determined based on the two videos meeting corresponding preset matching conditions.
例如,视频序列中的两个相邻的视频中的一个视频对应的拍摄装置的运动方向和另一个视频对应的拍摄装置的运动方向的差异较大,例如一个视频对应的运动方向与另一个视频对应的运动方向垂直,可以使得在根据视频序列生成的剪辑视频播放时,两个相邻的视频的切换产生具有冲击性的视觉效果,剪辑视频具有较好的观赏性。For example, the movement direction of the camera corresponding to one of the two adjacent videos in the video sequence and the movement direction of the camera corresponding to the other video are quite different. For example, the direction of the movement corresponding to one video is different from that of the other video. The corresponding movement direction is vertical, so that when the clip video generated according to the video sequence is played, the switching of two adjacent videos produces an impactful visual effect, and the clip video has better viewing.
预设匹配条件可以包括:一个视频对应的拍摄装置的运动方向与另一个视频对应的拍摄装置的运动方向的差异大于运动方向差异阈值。The preset matching condition may include: the difference between the movement direction of the camera corresponding to one video and the movement direction of the camera corresponding to the other video is greater than the movement direction difference threshold.
若获取到的多个视频中的一个视频对应的拍摄装置的运动方向与另一个视频对应的拍摄装置的运动方向的差异大于运动方向差异阈值,则该一个视频和该另一个视频作为视频序列中的相邻的两个视频。If the difference between the motion direction of the camera corresponding to one of the multiple videos and the motion direction of the camera corresponding to the other video is greater than the motion direction difference threshold, then the one video and the other video are regarded as the video sequence Two adjacent videos.
例如,视频序列中的两个相邻的视频中的一个视频对应的拍摄装置在移动时所处的高度和另一个视频对应的拍摄装置在移动时所处的高度的差异较大,可以使得在根据视频序列生成的剪辑视频播放时,两个相邻的视频的切换产生具有冲击性的视觉效果,剪辑视频具有较好的观赏性。For example, the height of the camera corresponding to one of the two adjacent videos in the video sequence is different from the height of the camera corresponding to the other When the clip video generated according to the video sequence is played, the switching of two adjacent videos produces an impactful visual effect, and the clip video has better viewing.
预设匹配条件可以包括:一个视频对应的拍摄装置在移动时所处的高度和另一个视频对应的拍摄装置在移动时所处的高度的差异大于高度差阈值。The preset matching condition may include: the height difference between the height of the camera corresponding to one video and the height of the camera corresponding to the other video is greater than the height difference threshold.
若获取到的多个视频中的一个视频对应的拍摄装置在移动时所处的高度和另一个视频对应的拍摄装置在移动时所处的高度的差异大于高度差阈值,则该一个视频和该另一个视频可以作为视频序列中的两个相邻的视频。If the difference between the height of the camera corresponding to one of the videos and the height of the camera corresponding to the other video when moving is greater than the height difference threshold, then the one video and the Another video can be used as two adjacent videos in a video sequence.
例如,视频序列中的两个相邻的视频中的一个视频对应的运动方向与另一个视频对应的运动方向之间的夹角处于预先设置的与视觉上的平滑的切换相关联的角度范围内,使得该两个相邻的视频的切换是在视觉上的平滑的切换,剪辑视频具有较好的观赏性。For example, the angle between the motion direction corresponding to one video in the two adjacent videos in the video sequence and the motion direction corresponding to the other video is within a preset angle range associated with visually smooth switching , So that the switching of the two adjacent videos is a visually smooth switching, and the edited video has better viewing.
预设匹配条件可以包括:一个视频对应的运动方向与另一个视频对应的运动方向之间的夹角处于预先设置的与视觉上的平滑的切换相关联的角度范围内。The preset matching condition may include: an angle between a motion direction corresponding to one video and a motion direction corresponding to another video is within a preset angle range associated with visually smooth switching.
若获取到的多个视频中的一个视频对应的运动方向与另一个视频对 应的运动状态中的运动方向之间的夹角处于预先设置的与视觉上的平滑的切换相关联的角度范围内,则该一个视频和该另一个视频可以作为视频序列中的两个相邻的视频。If the angle between the motion direction corresponding to one video in the acquired multiple videos and the motion direction in the motion state corresponding to the other video is within the preset angle range associated with visually smooth switching, Then the one video and the other video can be regarded as two adjacent videos in the video sequence.
在一些实施例中,视频序列中第一视频的结束时间段对应的拍摄装置的运动状态与第二视频的起始时间段对应的拍摄装置的运动状态相匹配,第一视频和第二视频为视频序列中时序相邻的视频。In some embodiments, the motion state of the camera corresponding to the end period of the first video in the video sequence matches the motion state of the camera corresponding to the start period of the second video, and the first video and the second video are Videos that are adjacent in sequence in a video sequence.
在一些实施例中,第一视频在视频序列中的位置可以在第二视频在视频序列中的位置之前。两个相邻的视频中的在视频序列中的位置在前的视频可以称之为第一视频,两个相邻的视频中的在视频序列中的位置在后的视频可以称之为第二视频。In some embodiments, the position of the first video in the video sequence may precede the position of the second video in the video sequence. The video with the first position in the video sequence among the two adjacent videos can be called the first video, and the video with the second position in the video sequence among the two adjacent videos can be called the second video. video.
例如,将原始视频1划分为视频A1、视频A2、视频A3、视频A4。将原始视频2划分为视频B1、视频B2、视频B3、视频B4。将原始视频3划分为视频C1、视频C2、视频C3、视频C4。将原始视频4划分为视频D1、视频D2、视频D3、视频D4。查找出的一个视频序列包括:A1、B2、C3、D4。视频序列中的顺序为A1、B2、C3、D4。对于A1和B2,A1为第一视频,B2为第二视频,A1的结束时间段对应的拍摄装置的运动状态与B2的起始时间段对应的拍摄装置的运动状态相匹配。对于B2和C3,B2为第一视频,C3为第二视频,B2的结束时间段对应的拍摄装置的运动状态与C3的起始时间段对应的拍摄装置的运动状态相匹配。对于C3和D4,C3为第一视频,D4为第二视频,视频序列中C3的结束时间段对应的拍摄装置的运动状态与D4的起始时间段对应的拍摄装置的运动状态相匹配。For example, divide the original video 1 into video A1, video A2, video A3, and video A4. Divide the original video 2 into video B1, video B2, video B3, and video B4. The original video 3 is divided into video C1, video C2, video C3, and video C4. Divide the original video 4 into video D1, video D2, video D3, and video D4. A video sequence found includes: A1, B2, C3, D4. The order in the video sequence is A1, B2, C3, D4. For A1 and B2, A1 is the first video, B2 is the second video, and the motion state of the camera corresponding to the end time period of A1 matches the motion state of the camera corresponding to the start time period of B2. For B2 and C3, B2 is the first video, C3 is the second video, and the motion state of the camera corresponding to the end time period of B2 matches the motion state of the camera corresponding to the start time period of C3. For C3 and D4, C3 is the first video, D4 is the second video, and the motion state of the camera corresponding to the end period of C3 in the video sequence matches the motion state of the camera corresponding to the start period of D4.
在一些实施例中,视频序列中时序相邻的两个视频属于不同的原始视频。In some embodiments, two videos that are adjacent in time sequence in the video sequence belong to different original videos.
在一些实施例中,视频序列中第一视频的结束时间段对应的拍摄装置的运动状态与第二视频的起始时间段对应的拍摄装置的运动状态相匹配,包括:第一视频的结束时间段对应的拍摄装置的运动方向与第二视频的起始时间段对应的拍摄装置的运动方向一致。In some embodiments, the motion state of the shooting device corresponding to the end time period of the first video in the video sequence matches the motion state of the shooting device corresponding to the start time period of the second video, including: the end time of the first video The movement direction of the camera corresponding to the segment is consistent with the movement direction of the camera corresponding to the start time period of the second video.
查找出的一个视频序列包括:A1、B2、C3、D4。视频序列中的顺序为A1、B2、C3、D4。对于A1和B2,A1为第一视频,B2为第二视频,A1的结束时间段对应的拍摄装置的运动方向与B2的起始时间段对应的拍摄装置的运动方向一致。对于B2和C3,B2为第一视频,C3为第二视频,B2的结束时间段对应的拍摄装置的运动方向与C3的起始时间段对应的拍摄装置的运动方向一致。对于C3和D4,C3为第一视频,D4为第二视频,C3的结束时间段对应的拍摄装置的运动方向与D4的起始时间段对应的拍摄装置的运动方向一致。A video sequence found includes: A1, B2, C3, D4. The order in the video sequence is A1, B2, C3, D4. For A1 and B2, A1 is the first video, B2 is the second video, and the motion direction of the camera corresponding to the end time period of A1 is consistent with the motion direction of the camera corresponding to the start time period of B2. For B2 and C3, B2 is the first video, C3 is the second video, and the motion direction of the camera corresponding to the end time period of B2 is consistent with the motion direction of the camera corresponding to the start time period of C3. For C3 and D4, C3 is the first video, D4 is the second video, and the motion direction of the camera corresponding to the end time period of C3 is consistent with the motion direction of the camera corresponding to the start time period of D4.
在视频序列中的第一视频的结束时间段对应的拍摄装置的运动方向与第二视频的起始时间段对应的拍摄装置的运动方向一致,可以使得任意两个相邻的视频的切换是在视觉上的平滑的切换,剪辑视频具有较好 的观赏性。In the video sequence, the motion direction of the camera corresponding to the end time period of the first video is consistent with the motion direction of the camera corresponding to the start time period of the second video, so that any two adjacent videos can be switched at Visually smooth switching, the edited video has better viewing.
在一些实施例中,第一视频的结束时间段对应的拍摄装置的运动方向与第二视频的起始时间段对应的拍摄装置的运动方向一致,包括:第一视频对应的运动矢量与第二视频对应的运动矢量之间的夹角小于角度阈值以及第一视频对应的运动矢量的模的长度与第二视频对应的运动矢量的模的长度的比值小于比例阈值。In some embodiments, the motion direction of the camera corresponding to the end time period of the first video is consistent with the motion direction of the camera corresponding to the start time period of the second video, including: the motion vector corresponding to the first video and the second video The angle between the motion vectors corresponding to the videos is less than the angle threshold and the ratio of the modulus length of the motion vector corresponding to the first video to the modulus length of the motion vector corresponding to the second video is less than the proportional threshold.
在一些实施例中,当第一视频对应的运动矢量与第二视频对应的运动矢量之间的夹角小于角度阈值以及第一视频对应的运动矢量的模的长度与第二视频对应的运动矢量的模的长度的比值小于比例阈值时,则第一视频的结束时间段对应的拍摄装置的运动方向与第二视频的起始时间段对应的拍摄装置的运动方向一致。In some embodiments, when the angle between the motion vector corresponding to the first video and the motion vector corresponding to the second video is less than the angle threshold and the length of the modulus of the motion vector corresponding to the first video is the same as the motion vector corresponding to the second video When the ratio of the length of the modulus is smaller than the ratio threshold, the motion direction of the camera corresponding to the end time period of the first video is consistent with the motion direction of the camera corresponding to the start time period of the second video.
在一些实施例中,所述拍摄装置通过云台安装于可移动平台,所述拍摄装置设置有惯性测量单元,所述获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态,包括:获取所述惯性测量单元的测量数据和所述云台的姿态角以确定所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。例如通过惯性测量单元的测量数据得到拍摄装置的位置,通过云台的姿态角得到拍摄装置的姿态,当计算视频的起始时间段拍摄装置的运动矢量时,可以获取在视频的起始时间段的开始时刻拍摄装置的位置和姿态以及视频的起始时间段的结束时刻拍摄装置的位置和姿态。根据视频的起始时间段的开始时刻拍摄装置的位置和视频的起始时间段的结束时刻拍摄装置的位置,计算在视频的起始时间段内拍摄装置的位移量。根据视频的起始时间段的开始时刻拍摄装置的姿态和视频的起始时间段的结束时刻拍摄装置的姿态,计算在视频的起始时间段内拍摄装置的姿态的变化量。然后,根据在视频的起始时间段内拍摄装置的位移量和拍摄装置的姿态的变化量,计算在视频的起始时间段拍摄装置的运动矢量。同理,可以计算在视频的结束时间段拍摄装置的运动矢量。In some embodiments, the photographing device is installed on a movable platform through a pan/tilt, the photographing device is provided with an inertial measurement unit, and the acquisition of the corresponding one of the multiple videos in the initial time period The motion state of the shooting device and the motion state of the shooting device corresponding to the end time period include: acquiring the measurement data of the inertial measurement unit and the attitude angle of the pan/tilt to determine whether each video in the plurality of videos is The movement state of the photographing device corresponding to the start time period and the movement state of the photographing device corresponding to the end time period. For example, the position of the camera can be obtained from the measurement data of the inertial measurement unit, and the posture of the camera can be obtained from the attitude angle of the pan/tilt. When calculating the motion vector of the camera during the initial period of the video, it can be obtained in the initial period of the video. The position and posture of the camera at the start time and the position and posture of the camera at the end of the start time period of the video. According to the position of the shooting device at the start time of the start time period of the video and the position of the shooting device at the end time of the start time period of the video, the displacement amount of the shooting device during the start time period of the video is calculated. According to the posture of the shooting device at the start time of the start time period of the video and the posture of the shooting device at the end time of the start time period of the video, the amount of change in the posture of the shooting device during the start time period of the video is calculated. Then, according to the displacement amount of the shooting device and the change amount of the posture of the shooting device in the initial time period of the video, the motion vector of the shooting device in the initial time period of the video is calculated. In the same way, the motion vector of the camera at the end of the video can be calculated.
可选的,当计算视频的起始时间段拍摄装置的运动矢量时,可以获取邻近视频的起始时间段的开始时刻的多个时刻拍摄装置的运动参数和邻近视频的起始时间段的结束时刻的多个时刻拍摄装置的运动参数。根据任意一个邻近该开始时刻的时刻拍摄装置的运动参数和任意一个邻近该结束时刻的时刻拍摄装置的运动参数,均可以计算出一个运动矢量,从而,可以计算出多个运动矢量,可以将计算出的多个运动矢量的平均值作为计算视频的起始时间段拍摄装置的运动矢量。同理,可以计算视频的结束时间段拍摄装置的运动矢量。Optionally, when calculating the motion vector of the shooting device in the start time period of the video, the motion parameters of the shooting device at multiple times adjacent to the start time of the start time period of the video and the end of the start time period of the neighboring video can be obtained. The motion parameters of the device are captured at multiple moments in time. According to any motion parameter of the camera near the start time and any motion parameter of the camera near the end time, a motion vector can be calculated, so that multiple motion vectors can be calculated, and the calculation can be The average value of the multiple motion vectors is used as the motion vector of the camera in the initial time period of the video. In the same way, the motion vector of the camera at the end of the video can be calculated.
请参考图2,示出了查找视频序列的一个原理示意图。Please refer to FIG. 2, which shows a schematic diagram of a principle of searching for a video sequence.
假设拍摄装置安装于无人机。通过拍摄得到四个原始视频分别为视频1、视频2、视频3、视频4。示例的,视频1、视频2、视频3、视频4 均为无人机环绕目标对象进行环绕拍摄得到的视频。Assume that the camera is installed on a drone. The four original videos obtained by shooting are video 1, video 2, video 3, and video 4. For example, video 1, video 2, video 3, and video 4 are all videos obtained by the drone surrounding the target object for surround shooting.
将视频1划分为视频A1、视频A2、视频A3、视频A4。将视频2划分为视频B1、视频B2、视频B3、视频B4。将视频3划分为视频C1、视频C2、视频C3、视频C4。将视频4划分为视频D1、视频D2、视频D3、视频D4。Divide video 1 into video A1, video A2, video A3, and video A4. Divide video 2 into video B1, video B2, video B3, and video B4. Divide video 3 into video C1, video C2, video C3, and video C4. Divide video 4 into video D1, video D2, video D3, and video D4.
在图2中,示出了每一个视频的运动轨迹。In Figure 2, the motion trajectory of each video is shown.
在视频A1的结束时间段拍摄装置的运动方向与在视频B2的起始时间段拍摄装置的运动方向一致。在视频B2的结束时间段拍摄装置的运动方向与在视频C3的起始时间段拍摄装置的运动方向一致。在视频C3的结束时间段拍摄装置的运动方向与在视频D4的起始时间段拍摄装置的运动方向一致。The moving direction of the camera at the end time period of the video A1 is consistent with the moving direction of the camera at the start time of the video B2. The moving direction of the camera at the end time period of the video B2 is consistent with the moving direction of the camera at the start time of the video C3. The moving direction of the camera at the end time period of the video C3 is consistent with the moving direction of the camera at the start time of the video D4.
因此,A1、B2、C3、D4可以组成一个视频序列,在视频序列中,视频的顺序为A1、B2、C3、D4。Therefore, A1, B2, C3, and D4 can form a video sequence. In the video sequence, the order of the videos is A1, B2, C3, and D4.
同理,参考查找出包括A1、B2、C3、D4的视频序列的方式,可以查找出包括A1、C2、B3、D4的视频序列、包括A1、D2、B3、C4的视频序列等视频序列,在视频A1的结束时间段拍摄装置的运动方向与在视频C2的起始时间段拍摄装置的运动方向一致。在视频C2的结束时间段拍摄装置的运动方向与在视频B3的起始时间段拍摄装置的运动方向一致。在视频B3的结束时间段拍摄装置的运动方向与在视频D4的起始时间段拍摄装置的运动方向一致。Similarly, referring to the way to find video sequences including A1, B2, C3, and D4, you can find video sequences including A1, C2, B3, and D4, and video sequences including A1, D2, B3, and C4. The moving direction of the camera at the end time period of the video A1 is consistent with the moving direction of the camera at the start time of the video C2. The motion direction of the camera at the end time period of the video C2 is consistent with the motion direction of the camera at the start time period of the video B3. The moving direction of the camera at the end time period of the video B3 is consistent with the moving direction of the camera at the start time of the video D4.
在包括A1、D2、B3、C4的视频序列中,视频的顺序为A1、D2、B3、C4。在视频A1的结束时间段拍摄装置的运动方向与在视频D2的起始时间段拍摄装置的运动方向一致。在视频D2的结束时间段拍摄装置的运动方向与在视频B3的起始时间段拍摄装置的运动方向一致。在视频B3的结束时间段拍摄装置的运动方向与在视频C4的起始时间段拍摄装置的运动方向一致。In a video sequence including A1, D2, B3, and C4, the order of the video is A1, D2, B3, and C4. The motion direction of the camera at the end time period of the video A1 is consistent with the motion direction of the camera at the start time period of the video D2. The moving direction of the camera at the end time period of the video D2 is consistent with the moving direction of the camera at the start time of the video B3. The motion direction of the camera at the end time period of the video B3 is consistent with the motion direction of the camera at the start time period of the video C4.
对于每一个视频序列,在视频序列中的第一视频的结束时间段对应的拍摄装置的运动方向与第二视频的起始时间段对应的拍摄装置的运动方向一致,可以使得任意两个相邻的视频的切换是在视觉上的平滑的切换,对视频序列中的视频进行拼接得到的剪辑视频具有较好的观赏性。For each video sequence, the motion direction of the shooting device corresponding to the end time period of the first video in the video sequence is the same as the motion direction of the shooting device corresponding to the start time period of the second video, which can make any two adjacent The video switching is a visually smooth switching, and the clipped video obtained by splicing the videos in the video sequence has better viewing.
需要说明的是,上述实施例仅以无人机为例进行说明,并不构成对本发明的限制,例如,拍摄装置还可以设置于自动驾驶车辆,手持稳定器等。当拍摄装置设置于手持稳定器,如手持云台时,可以获取拍摄装置得到的多个视频,并获取多个视频中每个视频对应的拍摄装置的运动状态,并根据每个视频对应的拍摄装置的运动状态,对多个视频进行排序以确定视频序列。上述步骤的具体实现方式可参考前文描述,此处不再赘述。It should be noted that the foregoing embodiment only uses a drone as an example for description, and does not constitute a limitation to the present invention. For example, the camera may also be installed in an autonomous vehicle, a handheld stabilizer, and the like. When the shooting device is set in a handheld stabilizer, such as a handheld pan/tilt, multiple videos obtained by the shooting device can be obtained, and the motion state of the shooting device corresponding to each video in the multiple videos can be obtained, and the shooting according to the corresponding shooting of each video The motion state of the device, sort multiple videos to determine the video sequence. For the specific implementation of the above steps, reference may be made to the foregoing description, which will not be repeated here.
在一些实施例中,当拍摄装置安装于可移动平台时,还可以获取多个视频中每个视频对应的可移动平台的运动状态,并根据每个视频对应 的可移动平台的运动状态,对多个视频进行排序以确定视频序列。可移动平台的运动状态包括可移动平台的运动方向、运动轨迹、运动高度、速度中的一个或多个。上述步骤的具体实现方式可参考前文描述,此处不再赘述。In some embodiments, when the shooting device is installed on the movable platform, the movement state of the movable platform corresponding to each video in the multiple videos can also be obtained, and the movement state of the movable platform corresponding to each video can be adjusted according to the movement state of the movable platform corresponding to each video. Multiple videos are sorted to determine the video sequence. The movement state of the movable platform includes one or more of the movement direction, movement trajectory, movement height, and speed of the movable platform. For the specific implementation of the above steps, reference may be made to the foregoing description, which will not be repeated here.
步骤104,至少部分的基于视频序列,生成剪辑视频。Step 104: Generate a clipped video based at least in part on the video sequence.
在一些实施例中,可以将一个或多个视频序列提供给用户,由用户从所有提供给用户的视频序列中选取出用于生成剪辑视频的视频序列。对于用户选取的每一个用于生成剪辑视频的视频序列,将视频序列中的视频进行拼接,得到剪辑视频,然后,将得到的所有剪辑视频提供给用户。也可以对于每一个视频序列,将视频序列中的视频进行拼接,得到剪辑视频,然后,将得到的所有剪辑视频提供给用户。In some embodiments, one or more video sequences may be provided to the user, and the user selects the video sequence used to generate the clipped video from all the video sequences provided to the user. For each video sequence selected by the user for generating the clipped video, the videos in the video sequence are spliced to obtain the clipped video, and then all the obtained clipped videos are provided to the user. It is also possible to splice the videos in the video sequence for each video sequence to obtain a clipped video, and then provide all the obtained clipped videos to the user.
在一些实施例中,至少部分的基于视频序列,生成剪辑视频,包括:获取节奏点序列;根据节奏点序列和视频序列,生成剪辑视频。In some embodiments, generating the clipped video based at least in part on the video sequence includes: obtaining a rhythm point sequence; and generating the clipped video according to the rhythm point sequence and the video sequence.
在一些实施例中,可以利用查找出的视频序列和提供给用户的音乐中的用于生成剪辑视频的音乐,生成剪辑视频,用于生成剪辑视频的音乐或用于生成剪辑视频的音乐中的一部分作为剪辑视频的背景音乐,使得剪辑视频具有背景音乐。In some embodiments, the video sequence found and the music used to generate the clip video can be used to generate the clip video, the music used to generate the clip video or the music used to generate the clip video in the music provided to the user. One part is used as the background music of the clipped video, so that the clipped video has background music.
在一些实施例中,可以由用户从提供给用户的多个音乐中选取出用于生成剪辑视频的音乐。然后,可以获取由用于生成剪辑视频的音乐中的节奏点组成的节奏点序列。可以根据节奏点序列和视频序列,生成剪辑视频。In some embodiments, the user may select the music used to generate the clip video from a plurality of music provided to the user. Then, a rhythm point sequence composed of rhythm points in the music used to generate the clip video can be acquired. According to the rhythm point sequence and the video sequence, the clip video can be generated.
在一些实施例中,用于生成剪辑视频的音乐中的节奏点可以为周期性出现的节奏点。相应的,节奏点序列中的节奏点也可以为周期性出现的节奏点。In some embodiments, the rhythm points in the music used to generate the clip video may be rhythm points that appear periodically. Correspondingly, the rhythm points in the sequence of rhythm points may also be rhythm points that appear periodically.
在一些实施例中,节奏点序列中的节奏点可以为鼓点。可以提取用于生成剪辑视频的音乐的音频信号中的鼓声频段,根据鼓声频段中的每帧信号的频谱特征、振幅等,检测出用于生成剪辑视频的音乐中的周期性出现的鼓点,确定周期性出现的鼓点在用于生成剪辑视频的音乐中出现的时刻。In some embodiments, the rhythm points in the sequence of rhythm points may be drum points. It can extract the drum frequency band in the audio signal of the music used to generate the clip video, and detect the periodically appearing drum beats in the music used to generate the clip video according to the spectral characteristics and amplitude of each frame signal in the drum frequency band. , Determine the moment when the periodically appearing drum beats appear in the music used to generate the clipped video.
在一些实施例中,每一个视频序列可以分别对应一个或多个节奏点序列。当一个视频序列对应多个节奏点序列时,对于该视频序列对应的每一个节奏点序列,可以根据该视频序列和该节奏点序列,生成一个剪辑视频。In some embodiments, each video sequence may correspond to one or more rhythm point sequences. When a video sequence corresponds to multiple rhythm point sequences, for each rhythm point sequence corresponding to the video sequence, a clip video may be generated according to the video sequence and the rhythm point sequence.
在一些实施例中,视频序列中的每一个视频可以分别对应该视频序列对应的节奏点序列中的两个节奏点。In some embodiments, each video in the video sequence may correspond to two rhythm points in the rhythm point sequence corresponding to the video sequence.
在一些实施例中,可以首先检测出用于生成剪辑视频的音乐中的所有节奏点。当确定视频序列对应的节奏点序列时,可以根据视频序列中的视频的数量,确定节奏点序列中的节奏点的数量。然后,可以从所有节奏点中选取出确定出的数量的节奏点,由选取出的节奏点组成节奏点 序列。In some embodiments, all rhythm points in the music used to generate the clip video may be detected first. When determining the rhythm point sequence corresponding to the video sequence, the number of rhythm points in the rhythm point sequence may be determined according to the number of videos in the video sequence. Then, a determined number of rhythm points can be selected from all the rhythm points, and the selected rhythm points form a rhythm point sequence.
在一些实施例中,对于视频序列中的每一个视频,当该视频的时长大于其对应的两个节奏点之间的时间间隔时,可以对该视频进行压缩处理,使得该视频的时长等于其对应的两个节奏点之间的时间间隔,当该视频的时长小于其对应的两个节奏点之间的时间间隔时,可以对该视频进行拉伸处理,使得该视频的时长等于其对应的两个节奏点之间的时间间隔。从而,对于视频序列中的每一个视频,该视频的时长等于其对应的两个节奏点之间的时间间隔。In some embodiments, for each video in the video sequence, when the duration of the video is greater than the time interval between two corresponding rhythm points, the video may be compressed so that the duration of the video is equal to its duration. The time interval between two corresponding rhythm points. When the duration of the video is less than the time interval between the two corresponding rhythm points, the video can be stretched so that the duration of the video is equal to its corresponding The time interval between two rhythm points. Therefore, for each video in the video sequence, the duration of the video is equal to the time interval between two corresponding rhythm points.
在一些实施例中,对于视频序列中的一个视频,该视频对应的两个节奏点中的在用于生成剪辑视频的音乐中出现的时刻靠后的节奏点可以作为与该视频与该视频的下一个视频之间的切换相关联的节奏点。In some embodiments, for a video in a video sequence, of the two rhythm points corresponding to the video, the rhythm point that appears later in the music used to generate the clipped video can be used as the difference between the video and the video. The rhythm point associated with switching between the next videos.
例如,一个视频序列包括:视频A1、视频B2、视频C3、视频D4。该视频序列中的视频的顺序为视频A1、视频B2、视频C3、视频D4。该视频序列对应的节奏点序列包括:用于生成剪辑视频的音乐中的节奏点1、用于生成剪辑视频的音乐中的节奏点2、用于生成剪辑视频的音乐中的节奏点3、用于生成剪辑视频的音乐中的节奏点4、用于生成剪辑视频的音乐中的节奏点5。For example, a video sequence includes: video A1, video B2, video C3, and video D4. The order of the videos in the video sequence is video A1, video B2, video C3, and video D4. The rhythm point sequence corresponding to the video sequence includes: the rhythm point in the music used to generate the clip video 1, the rhythm point in the music used to generate the clipped video 2, the rhythm point in the music used to generate the clipped video, and the rhythm point in the music used to generate the clipped video. Rhythm point 4 in the music used to generate the clip video, and rhythm point 5 in the music used to generate the clip video.
在一些实施例中,该视频序列对应的节奏点序列中的节奏点在用于生成剪辑视频的音乐中顺序出现,也即出现的顺序依次为该节奏点1、该节奏点2、该节奏点3、该节奏点4、该节奏点5。在其他实施例中,节奏点序列中的节奏点在用于生成剪辑视频的音乐中并非顺序出现。In some embodiments, the rhythm points in the rhythm point sequence corresponding to the video sequence appear sequentially in the music used to generate the clipped video, that is, the order of appearance is the rhythm point 1, the rhythm point 2, the rhythm point. 3. The rhythm point 4, the rhythm point 5. In other embodiments, the rhythm points in the sequence of rhythm points do not appear sequentially in the music used to generate the clipped video.
视频A1对应的两个节奏点为该节奏点1、该节奏点2,该节奏点1该与该节奏点2的时间间隔等于视频A1的时长。节奏点2为与视频A1与视频B2之间的切换相关联的节奏点。The two rhythm points corresponding to the video A1 are the rhythm point 1 and the rhythm point 2, and the time interval between the rhythm point 1 and the rhythm point 2 is equal to the duration of the video A1. Rhythm point 2 is a rhythm point associated with the switch between video A1 and video B2.
视频B2对应的两个节奏点为该节奏点2、该节奏点3,该节奏点2该与该节奏点3的时间间隔等于视频B2的时长。节奏点3为与视频B2与视频C3之间的切换相关联的节奏点。The two rhythm points corresponding to the video B2 are the rhythm point 2 and the rhythm point 3. The time interval between the rhythm point 2 and the rhythm point 3 is equal to the duration of the video B2. The tempo point 3 is a tempo point associated with the switching between the video B2 and the video C3.
视频C3对应的两个节奏点为该节奏点3、该节奏点4,该节奏点3该与该节奏点4的时间间隔等于视频C3的时长。节奏点4为与视频C3与视频D4之间的切换相关联的节奏点。The two rhythm points corresponding to the video C3 are the rhythm point 3 and the rhythm point 4, and the time interval between the rhythm point 3 and the rhythm point 4 is equal to the duration of the video C3. Rhythm point 4 is a tempo point associated with switching between video C3 and video D4.
视频D4对应的两个节奏点为该节奏点4、该节奏点5,该节奏点4该与该节奏点5的时间间隔等于视频D4的时长。The two rhythm points corresponding to the video D4 are the rhythm point 4 and the rhythm point 5. The time interval between the rhythm point 4 and the rhythm point 5 is equal to the duration of the video D4.
在一些实施例中,一个视频序列对应的节奏点序列可以为多个。可以对于每一个视频序列,确定视频序列对应的一个或多个节奏点序列。In some embodiments, there may be multiple rhythm point sequences corresponding to one video sequence. For each video sequence, one or more rhythm point sequences corresponding to the video sequence can be determined.
例如,确定包括A1、B2、C3、D4的视频序列。用于生成剪辑视频的音乐中包括:节奏点1、节奏点2、节奏点3、节奏点4、节奏点5、节奏点6、节奏点7、节奏点8、节奏点9、节奏点10。包括A1、B2、C3、D4的视频序列对应的节奏点序列可以由节奏点1、节奏点2、节奏点3、节奏点4、节奏点5组成,或者包括A1、B2、C3、D4的视频序列对应的 节奏点序列可以由节奏点6、节奏点7、节奏点8、节奏点9、节奏点10组成,。For example, it is determined that the video sequence includes A1, B2, C3, and D4. The music used to generate the edited video includes: Rhythm Point 1, Rhythm Point 2, Rhythm Point 3, Rhythm Point 4, Rhythm Point 5, Rhythm Point 6, Rhythm Point 7, Rhythm Point 8, Rhythm Point 9, and Rhythm Point 10. The rhythm point sequence corresponding to the video sequence including A1, B2, C3, D4 can be composed of rhythm point 1, rhythm point 2, rhythm point 3, rhythm point 4, and rhythm point 5, or include videos of A1, B2, C3, and D4 The sequence of rhythm points corresponding to the sequence can be composed of rhythm point 6, rhythm point 7, rhythm point 8, rhythm point 9, and rhythm point 10.
在一些实施例中,也可以对于每一个视频序列,将视频序列中的视频的缩略图、视频序列对应的节奏点序列中的节奏点的标识、节奏点在用于生成剪辑视频的音乐中出现的时刻等内容在视频剪辑界面中呈现给需要获取剪辑视频的用户。由用户选择是否利用视频序列和视频序列对应的节奏点序列,生成剪辑视频。当用户进行指示利用视频序列和视频序列对应的节奏点序列,生成剪辑视频的操作时,可以生成剪辑视频。In some embodiments, for each video sequence, the thumbnail of the video in the video sequence, the identification of the rhythm point in the rhythm point sequence corresponding to the video sequence, and the rhythm point appear in the music used to generate the clip video. The moment of time and other content are presented in the video editing interface to users who need to obtain the clipped video. The user chooses whether to use the video sequence and the rhythm point sequence corresponding to the video sequence to generate the clipped video. When the user instructs to use the video sequence and the rhythm point sequence corresponding to the video sequence to generate a clipped video, the clipped video can be generated.
在一些实施例中,在根据一个视频序列和该视频序列对应的节奏点序列生成一个剪辑视频之后,该视频序列中的每一个视频作为该剪辑视频中的一个视频。剪辑视频中的视频的顺序与视频序列中的视频的顺序一致。对于每一个视频,在用于生成剪辑视频的音乐中的位于视频对应的两个节奏点之间的音乐段作为剪辑视频的背景音乐的一段。In some embodiments, after a clip video is generated according to a video sequence and the rhythm point sequence corresponding to the video sequence, each video in the video sequence is used as a video in the clip video. The order of the videos in the clipped video is consistent with the order of the videos in the video sequence. For each video, in the music used to generate the clipped video, a music segment located between two rhythm points corresponding to the video is used as a segment of the background music of the clipped video.
在一些实施例中,当播放剪辑视频时,在播放一个视频的同时,播放在用于生成剪辑视频的音乐中的位于该视频对应的两个节奏点之间的音乐段。In some embodiments, when a clip video is played, while playing a video, a music segment located between two rhythm points corresponding to the video in the music used to generate the clip video is played.
在一些实施例中,剪辑视频中的每一个视频均具有在播放时间轴上的开始时刻和在播放时间轴上的结束时刻。对于剪辑视频中的一个视频,该视频在播放时间轴上的开始时刻可以是指播放剪辑视频时,在播放时间轴上的开始播放该视频的时刻,该视频在播放时间轴上的结束时刻可以是指当播放剪辑视频时,在播放时间轴上的结束播放该视频的时刻。In some embodiments, each video in the clipped video has a start moment on the playback timeline and an end moment on the playback timeline. For a video in a clip video, the start moment of the video on the playback timeline can refer to the moment when the video starts to be played on the playback timeline when the clip video is played, and the end moment of the video on the playback timeline can be It refers to the moment when the video is played on the playback timeline when the clip video is played.
在一些实施例中,对于剪辑视频中的位置相邻的两个视频,位置在前的视频的结束时刻为位置在后的视频的开始时刻。In some embodiments, for two videos with adjacent positions in the clipped video, the end time of the video with the previous position is the start time of the video with the subsequent position.
在一些实施例中,当播放剪辑视频时,视频序列对应的节奏点序列中的每一个节奏点均具有一个在播放时间轴上的出现时刻。In some embodiments, when the clip video is played, each rhythm point in the sequence of rhythm points corresponding to the video sequence has an appearance moment on the playback time axis.
在一些实施例中,对于剪辑视频中的一个视频,该视频的时长等于该视频对应的两个节奏点的时间间隔。该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠后的节奏点为与从该视频切换到该视频的下一个视频相关的节奏点。该视频在播放时间轴上的开始时刻与该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠前的节奏点在播放时间轴上的出现时刻相同,该视频在播放时间轴上的结束时刻与该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠后的节奏点在播放时间轴上的出现时刻相同。该视频的下一个视频在播放时间轴上的开始时刻与该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠后的节奏点在播放时间轴上的出现时刻相同。In some embodiments, for one video in the clipped video, the duration of the video is equal to the time interval between two rhythm points corresponding to the video. Among the two rhythm points corresponding to the video, the rhythm point that appears later on the playback time axis is the rhythm point related to the next video switching from the video to the video. The start time of the video on the playback timeline is the same as the appearance time of the first rhythm point on the playback timeline of the two rhythm points corresponding to the video on the playback timeline. The video is on the playback timeline. The end time on the above is the same as the appearance time of the rhythm point on the playback time axis of the two rhythm points corresponding to the video that is later on the playback time axis. The start time of the next video of the video on the play time axis is the same as the appearance time of the rhythm point on the play time axis of the two rhythm points corresponding to the video that is later than the appearance time on the play time axis.
在播放剪辑视频的过程中,在该视频在播放时间轴上的开始时刻开始播放该视频,换言之,在该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠前的节奏点在播放时间轴上的出现时刻,开始播放该视频。在该视频在播放时间轴上的结束时刻结束播放该视频,从该视频切 换到下一个视频,开始播放该视频的下一个视频,换言之,在该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠后的节奏点在播放时间轴上的出现时刻,从该视频切换到下一个视频,开始播放该视频的下一个视频。由于该视频对应的运动特征与该视频的下一个视频的运动特征匹配,因此,当从该视频切换到下一个视频时,可以进行在视觉上的平滑的切换。In the process of playing a clipped video, the video is played at the beginning of the video on the playback timeline, in other words, the rhythm point that appears earlier on the playback timeline among the two rhythm points corresponding to the video At the moment of appearance on the playback timeline, start playing the video. Play the video at the end time of the video on the playback timeline, switch from the video to the next video, and start playing the next video of the video, in other words, in the playback time of the two rhythm points corresponding to the video The appearance time of the rhythm point on the playback time axis at the later time of appearance on the axis is switched from the video to the next video, and the next video of the video is started to be played. Since the motion feature corresponding to the video matches the motion feature of the next video of the video, when switching from the video to the next video, visually smooth switching can be performed.
请参考图3,其示出了视频序列中的视频和节奏点在时序上的关联关系的效果示意图。Please refer to FIG. 3, which shows a schematic diagram of the effect of the association relationship between the video and the rhythm point in the video sequence on the time sequence.
在图3中,示出了一个视频序列中的视频A1、视频B2、视频C3、视频D4。该视频序列中的视频的顺序为视频A1、视频B2、视频C3、视频D4。该视频序列对应的节奏点序列包括:用于生成剪辑的音乐中的节奏点1、用于生成剪辑的音乐中的节奏点2、用于生成剪辑的音乐中的节奏点3、用于生成剪辑的音乐中的节奏点4、用于生成剪辑的音乐中的节奏点5。视频序列对应的节奏点序列中的节奏点在用于生成剪辑视频的音乐中出现的顺序依次为该节奏点1、该节奏点2、该节奏点3、该节奏点4、该节奏点5。In Fig. 3, video A1, video B2, video C3, and video D4 in a video sequence are shown. The order of the videos in the video sequence is video A1, video B2, video C3, and video D4. The rhythm point sequence corresponding to the video sequence includes: the rhythm point in the music used to generate the clip 1, the rhythm point in the music used to generate the clip 2, the rhythm point in the music used to generate the clip 3, and the rhythm point in the music used to generate the clip. Rhythm point 4 in the music used to generate the clip. Rhythm point 5 in the music used to generate the clip. The order in which the rhythm points in the rhythm point sequence corresponding to the video sequence appear in the music used to generate the clipped video is the rhythm point 1, the rhythm point 2, the rhythm point 3, the rhythm point 4, and the rhythm point 5.
视频A1对应的两个节奏点为该节奏点1、该节奏点2,该节奏点1与该节奏点2的时间间隔等于视频A1的时长。该节奏点2为与视频A1与视频B2之间的切换相关联的节奏点。The two rhythm points corresponding to the video A1 are the rhythm point 1 and the rhythm point 2, and the time interval between the rhythm point 1 and the rhythm point 2 is equal to the duration of the video A1. The rhythm point 2 is a rhythm point associated with the switch between video A1 and video B2.
视频B2对应的两个节奏点为该节奏点2、该节奏点3,该节奏点2与该节奏点3的时间间隔等于视频B2的时长。该节奏点3为与视频B2与视频C3之间的切换相关联的节奏点。The two rhythm points corresponding to the video B2 are the rhythm point 2 and the rhythm point 3. The time interval between the rhythm point 2 and the rhythm point 3 is equal to the duration of the video B2. The rhythm point 3 is a rhythm point associated with the switch between video B2 and video C3.
视频C3对应的两个节奏点为该节奏点3、该节奏点4,该节奏点3与该节奏点4的时间间隔等于视频C3的时长。该节奏点4为与视频C3与视频D4之间的切换相关联的节奏点。The two rhythm points corresponding to the video C3 are the rhythm point 3 and the rhythm point 4, and the time interval between the rhythm point 3 and the rhythm point 4 is equal to the duration of the video C3. The rhythm point 4 is a rhythm point associated with switching between the video C3 and the video D4.
视频D4对应的两个节奏点为该节奏点4、该节奏点5,该节奏点4与该节奏点5的时间间隔等于视频D4的时长。The two rhythm points corresponding to the video D4 are the rhythm point 4 and the rhythm point 5. The time interval between the rhythm point 4 and the rhythm point 5 is equal to the duration of the video D4.
当该视频序列和该视频序列对应的节奏点序列被用于生成一个剪辑视频时,生成的一个剪辑视频包括:该视频序列和该剪辑视频的背景音乐。When the video sequence and the rhythm point sequence corresponding to the video sequence are used to generate a clipped video, the generated clipped video includes: the video sequence and the background music of the clipped video.
该剪辑视频的背景音乐包括:位于该节奏点1在用于生成剪辑的音乐中出现的时刻与该节奏点2在用于生成剪辑的音乐中出现的时刻之间的时间段的音乐段1、位于该节奏点2在用于生成剪辑的音乐中出现的时刻与该节奏点3在用于生成剪辑的音乐中出现的时刻之间的时间段的音乐段2、位于该节奏点3在用于生成剪辑的音乐中出现的时刻与节奏点4在用于生成剪辑的音乐中出现的时刻之间的时间段的音乐段3、位于该节奏点4在用于生成剪辑的音乐中出现的时刻与节奏点5在用于生成剪辑的音乐中出现的时刻之间的时间段的音乐段4。The background music of the clip video includes: music segment 1 located in the time period between the time when the rhythm point 1 appears in the music used to generate the clip and the time when the rhythm point 2 appears in the music used to generate the clip. Music segment 2, located in the time period between the time when the rhythm point 2 appears in the music used to generate the clip and the time when the rhythm point 3 appears in the music used to generate the clip 2, is located at the rhythm point 3 The music segment 3 of the time period between the moment when the clip is generated and the moment when the rhythm point 4 appears in the music used to generate the clip, the moment when the rhythm point 4 appears in the music used to generate the clip, and The music segment 4 of the time period between the moments when the rhythm point 5 appears in the music used to generate the clip.
在图3中,示出的时间轴表示播放剪辑视频时的播放时间轴。节奏 点1在播放时间轴上的出现时刻可以为播放时间轴上的0时刻,其他的节奏点在播放时间轴上的出现时刻也可以被确定。此外,节奏点1在播放时间轴上的出现时刻也可以由需要获取剪辑视频的用户设置,根据用户设置的节奏点1在播放时间轴上的出现时刻,其他的节奏点在播放时间轴上的出现时刻也可以被确定。In FIG. 3, the time axis shown represents the playback time axis when the clip video is played. The appearance time of rhythm point 1 on the playback time axis can be time 0 on the playback time axis, and the appearance time of other rhythm points on the playback time axis can also be determined. In addition, the appearance time of rhythm point 1 on the playback timeline can also be set by the user who needs to obtain the edited video. According to the appearance time of rhythm point 1 on the playback timeline set by the user, other rhythm points are on the playback timeline. The moment of appearance can also be determined.
视频A1的时长等于节奏点1与节奏点2的时间间隔。视频A1在播放时间轴上的开始时刻与节奏点1在播放时间轴上的出现时刻相同,视频A1在播放时间轴上的开始时刻为播放时间轴上的0时刻。视频A1在播放时间轴上的结束时刻与节奏点2在播放时间轴上的出现时刻相同。The duration of video A1 is equal to the time interval between rhythm point 1 and rhythm point 2. The start time of video A1 on the play time axis is the same as the appearance time of rhythm point 1 on the play time axis, and the start time of video A1 on the play time axis is time 0 on the play time axis. The ending time of video A1 on the playback time axis is the same as the appearance time of rhythm point 2 on the playback time axis.
视频B2的时长等于节奏点2与节奏点3的时间间隔。视频B2在播放时间轴上的开始时刻与节奏点2在播放时间轴上的出现时刻相同,视频B2在播放时间轴上的结束时刻与节奏点3在播放时间轴上的出现时刻相同。The duration of video B2 is equal to the time interval between rhythm point 2 and rhythm point 3. The start time of video B2 on the play time axis is the same as the appearance time of rhythm point 2 on the play time axis, and the end time of video B2 on the play time axis is the same as the appearance time of rhythm point 3 on the play time axis.
视频C3的时长等于节奏点3与节奏点4的时间间隔。视频C3在播放时间轴上的开始时刻与节奏点3在播放时间轴上的出现时刻相同,视频C3在播放时间轴上的结束时刻与节奏点4在播放时间轴上的出现时刻相同。The duration of video C3 is equal to the time interval between rhythm point 3 and rhythm point 4. The start time of video C3 on the play time axis is the same as the appearance time of rhythm point 3 on the play time axis, and the end time of video C3 on the play time axis is the same as the appearance time of rhythm point 4 on the play time axis.
视频D4的时长等于节奏点4与节奏点5的时间间隔。视频D4在播放时间轴上的开始时刻与节奏点4在播放时间轴上的出现时刻相同,视频D4在播放时间轴上的结束时刻为节奏点5在播放时间轴上的出现时刻。The duration of video D4 is equal to the time interval between rhythm point 4 and rhythm point 5. The start time of video D4 on the play time axis is the same as the appearance time of rhythm point 4 on the play time axis, and the end time of video D4 on the play time axis is the appearance time of rhythm point 5 on the play time axis.
在基于该视频序列和该视频序列对应的节奏点序列生成一个剪辑视频之后,当播放该剪辑视频时,首先播放视频A1,从节奏点1在播放时间轴上的出现时刻即播放时间轴上的0时刻开始播放视频A1。在视频A1的播放过程中,在将视频A1中的图像呈现给用户的同时,播放音乐段1。当到达节奏点2在播放时间轴上的出现时刻,停止播放视频A1,从视频A1切换到视频B2,继续播放视频B2。在播放视频B2的过程中,在将视频B2中的图像呈现给用户的同时,播放音乐片段2。当到达节奏点3在播放时间轴上的出现时刻,停止播放视频B2,从视频B2切换到视频C3,继续播放视频C3。在播放视频C3的过程中,在将视频C3中的图像呈现给用户的同时,播放音乐片段3。当到达节奏点4在播放时间轴上的出现时刻,停止播放视频C3,从视频C3切换到视频D4,继续播放视频D4。在播放视频D4的过程中,在将视频D4中的图像呈现给用户的同时,播放音乐片段4。After a clip video is generated based on the video sequence and the rhythm point sequence corresponding to the video sequence, when the clip video is played, the video A1 is first played, and the appearance of the rhythm point 1 on the playback time axis is the time on the playback time axis. Start playing video A1 at time 0. During the playback of the video A1, while the image in the video A1 is presented to the user, the music segment 1 is played. When it reaches the time when the rhythm point 2 appears on the playback time axis, stop playing video A1, switch from video A1 to video B2, and continue playing video B2. In the process of playing the video B2, while the image in the video B2 is presented to the user, the music segment 2 is played. When reaching the time when the rhythm point 3 appears on the playback time axis, stop playing video B2, switch from video B2 to video C3, and continue playing video C3. In the process of playing the video C3, while the image in the video C3 is presented to the user, the music segment 3 is played. When it reaches the time when the rhythm point 4 appears on the playback time axis, stop playing video C3, switch from video C3 to video D4, and continue playing video D4. In the process of playing the video D4, the music segment 4 is played while the image in the video D4 is presented to the user.
视频A1对应的运动特征与视频B2对应的运动特征匹配,视频B2对应的运动特征与视频C3对应的运动特征匹配,视频C3对应的运动特征与视频D4对应的运动特征匹配。因此,从视频A1切换到视频B2、从视频B2切换到视频C3、从视频C3切换到视频D4中的任意一次在相应的节奏点出现的时刻完成的视频的切换均为在视觉上的平滑的切换。The motion feature corresponding to video A1 matches the motion feature corresponding to video B2, the motion feature corresponding to video B2 matches the motion feature corresponding to video C3, and the motion feature corresponding to video C3 matches the motion feature corresponding to video D4. Therefore, any one of switching from video A1 to video B2, switching from video B2 to video C3, or switching from video C3 to video D4, the video switching completed at the moment when the corresponding rhythm point appears is visually smooth. Switch.
在一些实施例中,根据节奏点序列和视频序列,生成剪辑视频,包括:根据节奏点序列,确定视频序列是否满足预设条件;当满足预设条件时,对视频序列中的每个视频进行拼接以得到剪辑视频;当不满足预设条件时,调整视频序列中的视频的起始点或结束点得到调整后的视频,对调整后的视频进行拼接以得到剪辑视频。In some embodiments, generating a clipped video according to the rhythm point sequence and the video sequence includes: determining whether the video sequence meets a preset condition according to the rhythm point sequence; when the preset condition is satisfied, performing a video sequence on each video in the video sequence Splicing to obtain a clipped video; when the preset condition is not met, adjust the starting point or end point of the video in the video sequence to obtain an adjusted video, and splicing the adjusted video to obtain the clipped video.
例如,预设条件可以为:对于视频序列中的每一个视频,该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠前的节奏点与视频的起始点的时间间隔小于时间阈值并且在播放时间轴上的出现时刻靠后的节奏点与视频的结束点的时间间隔小于时间阈值。For example, the preset condition may be: for each video in the video sequence, the time interval between the first rhythm point on the playback time axis and the start point of the video among the two rhythm points corresponding to the video is less than the time Threshold and the time interval between the rhythm point that appears later on the playback time axis and the end point of the video is less than the time threshold.
在播放时间轴上的出现时刻靠前的节奏点与视频的起始点的时间间隔可以是指在播放时间轴上的出现时刻靠前的节奏点在播放时间轴上出现的时刻与视频在播放时间轴上的开始时刻之间的时间差。The time interval between the rhythm point before the appearance time on the playback time axis and the start point of the video can refer to the time when the rhythm point before the appearance time on the playback time axis appears on the playback time axis and the video playback time The time difference between the start moments on the axis.
在播放时间轴上的出现时刻靠后的节奏点与视频的结束点的时间间隔可以是指在播放时间轴上的出现时刻靠后的节奏点在播放时间轴上出现的时刻与视频的结束点在播放时间轴上的结束时刻之间的时间差。The time interval between the rhythm point later in the appearance time on the playback time axis and the end point of the video may refer to the time when the rhythm point later in the appearance time on the playback time axis appears on the playback time axis and the end point of the video. The time difference between the ending moments on the playback timeline.
当满足预设条件时,可以对视频序列中的每个视频进行拼接以得到剪辑视频。在进行拼接时,对于每一个视频,可以将视频对应的两个节奏点之间的音乐段作为剪辑视频的背景音乐中的对应于该视频的一段音乐。When the preset condition is met, each video in the video sequence can be spliced to obtain a clipped video. When splicing, for each video, the music segment between two rhythm points corresponding to the video can be used as a segment of music corresponding to the video in the background music of the clipped video.
当视频序列中存在至少一个满足以下调整条件的视频,则视频序列不满足预设条件:视频对应的两个节奏点中的在播放时间轴上的出现时刻靠前的节奏点与视频的起始点的时间间隔大于时间阈值和/或视频对应的两个节奏点中的在播放时间轴上的出现时刻靠后的节奏点与视频的结束点的时间间隔大于时间阈值。When there is at least one video that meets the following adjustment conditions in the video sequence, the video sequence does not meet the preset conditions: the first rhythm point of the two rhythm points corresponding to the video and the starting point of the video that appear earlier on the playback time axis The time interval of is greater than the time threshold and/or the time interval between the rhythm point of the two rhythm points corresponding to the video that appears later on the playback time axis and the end point of the video is greater than the time threshold.
当不满足预设条件时,将满足调整条件的视频确定为视频序列中的需要调整的视频。对于每一个需要调整的视频,分别对需要调整的视频的起始点或结束点进行调整,即对需要调整的视频在播放时间轴上的开始时刻或在播放时间轴上的结束时刻在播放时间轴上的位置,得到调整后的视频。对于每一个需要调整的视频,在对视频进行调整后得到的调整后的视频均满足该视频对应的两个节奏点中的在播放时间轴上的出现时刻靠前的节奏点与视频的起始点的时间间隔小于时间阈值并且在播放时间轴上的出现时刻靠后的节奏点与视频的结束点的时间间隔小于时间阈值。得到的所有调整后的视频和未经过调整的视频进行拼接,得到剪辑视频。When the preset condition is not met, the video that meets the adjustment condition is determined as the video that needs to be adjusted in the video sequence. For each video that needs to be adjusted, adjust the start point or end point of the video that needs to be adjusted, that is, the start time of the video that needs to be adjusted on the playback timeline or the end time on the playback timeline in the playback timeline On the position to get the adjusted video. For each video that needs to be adjusted, the adjusted video obtained after adjusting the video satisfies the two rhythm points corresponding to the video, the rhythm point that appears earlier on the playback time axis and the start point of the video The time interval of is less than the time threshold, and the time interval between the rhythm point that appears later on the playback time axis and the end point of the video is less than the time threshold. All the obtained adjusted videos and unadjusted videos are spliced together to obtain a clipped video.
在一些实施例中,调整视频的起始点或结束点得到调整后的视频,包括:对视频进行裁剪、压缩或拉伸处理,以调整视频的起始点或结束点得到调整后的视频。In some embodiments, adjusting the start point or end point of the video to obtain the adjusted video includes: cropping, compressing, or stretching the video to adjust the start point or end point of the video to obtain the adjusted video.
在确定视频序列中的需要调整的视频之后,可以对需要调整的视频进行裁剪,以调整视频的起始点或结束点,得到调整后的视频。可以对 需要进行压缩,以调整视频的起始点或结束点,得到调整后的视频。可以对需要调整的视频进行拉伸处理,得到调整后的视频。After determining the video that needs to be adjusted in the video sequence, the video that needs to be adjusted can be cropped to adjust the start point or end point of the video to obtain the adjusted video. It can be compressed to adjust the start point or end point of the video to get the adjusted video. You can stretch the video that needs to be adjusted to get the adjusted video.
在一些实施例中,预设条件包括:视频序列中的视频的起始点或结束点与节奏点序列中的任一节奏点的时间间隔小于或等于预设时间阈值。In some embodiments, the preset condition includes: the time interval between the start point or end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to a preset time threshold.
视频序列中的视频并不特指某一个视频,当预设条件包括视频序列中的视频的起始点或结束点与节奏点序列中的任一节奏点的时间间隔小于或等于预设时间阈值时,若视频序列中的任意一个视频的起始点或结束点与节奏点序列中的任一节奏点的时间间隔小于或等于预设时间阈值时,则满足预设条件。The video in the video sequence does not specifically refer to a certain video. When the preset conditions include the time interval between the start point or end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to the preset time threshold If the time interval between the start point or end point of any video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to the preset time threshold, the preset condition is met.
本申请实施例还提供了一种终端设备,终端设备包括处理器,处理器用于:获取多个视频,所述多个视频由拍摄装置拍摄得到;获取所述多个视频中每个视频对应的拍摄装置的运动状态;根据所述每个视频对应的拍摄装置的运动状态,对所述多个视频进行排序以确定视频序列;至少部分的基于所述视频序列,生成剪辑视频。An embodiment of the present application also provides a terminal device. The terminal device includes a processor, and the processor is configured to: obtain a plurality of videos, which are captured by a shooting device; and obtain a video corresponding to each of the plurality of videos. The motion state of the shooting device; according to the motion state of the shooting device corresponding to each video, the multiple videos are sorted to determine a video sequence; and a clip video is generated based at least in part on the video sequence.
在一些实施例中,所述处理器在获取所述多个视频中每个视频对应的所述拍摄装置的运动状态时,具体用于:获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。In some embodiments, when the processor obtains the motion state of the shooting device corresponding to each video in the plurality of videos, it is specifically configured to: obtain the start time of each video in the plurality of videos. The movement state of the photographing device corresponding to the segment and the movement state of the photographing device corresponding to the end time period.
在一些实施例中,所述处理器在获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态时,具体用于:获取所述每个视频中起始时间段的视频帧和结束时间段的视频帧;根据所述起始时间段的视频帧和所述结束时间段的视频帧,确定所述每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。In some embodiments, when the processor acquires the motion state of the photographing device corresponding to the start time period of each video in the plurality of videos and the motion state of the photographing device corresponding to the end time period, It is specifically used to: obtain the video frame of the start time period and the video frame of the end time period in each video; determine the video frame of each video according to the video frame of the start time period and the video frame of the end time period. The motion state of the shooting device corresponding to each video in the start time period and the motion state of the shooting device corresponding to the end time period.
在一些实施例中,所述处理器在根据所述起始时间段的视频帧和所述结束时间段的视频帧,确定所述每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态时,具体用于:获取所述起始时间段的视频帧的特征点;对所述起始时间段的视频帧的特征点进行特征点匹配,得到所述起始时间段对应的所述拍摄装置的运动状态;获取所述结束时间段的视频帧的特征点;对所述结束时间段的视频帧的特征点进行特征点匹配,得到所述结束时间段对应的所述拍摄装置的运动状态。In some embodiments, the processor determines the motion of the photographing device corresponding to the start time period of each video according to the video frame of the start time period and the video frame of the end time period. When the state and the motion state of the photographing device correspond to the end time period, they are specifically used to: obtain the feature points of the video frame of the start time period; perform feature points on the feature points of the video frame of the start time period Matching to obtain the motion state of the photographing device corresponding to the start time period; obtain the feature points of the video frame of the end time period; perform feature point matching on the feature points of the video frame of the end time period to obtain The motion state of the photographing device corresponding to the end time period.
在一些实施例中,所述拍摄装置通过云台安装于可移动平台,所述拍摄装置设置有惯性测量单元;所述处理器在获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和所述结束时间段对应的所述拍摄装置的运动状态时,具体用于:获取所述惯性测量单元的测量数据和所述云台的姿态角以确定所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和所述结束时间段对应的所述拍摄 装置的运动状态。In some embodiments, the photographing device is installed on a movable platform through a pan/tilt, and the photographing device is provided with an inertial measurement unit; the processor acquires each of the multiple videos corresponding to the start time period. When the motion state of the photographing device and the motion state of the photographing device corresponding to the end time period are specifically used to: obtain the measurement data of the inertial measurement unit and the attitude angle of the pan/tilt to determine the The motion state of the shooting device corresponding to each video in the start time period and the motion state of the shooting device corresponding to the end time period of each video in the plurality of videos.
在一些实施例中,视频序列中第一视频的结束时间段对应的所述拍摄装置的运动状态与第二视频的起始时间段对应的所述拍摄装置的运动状态相匹配,所述第一视频和所述第二视频为所述视频序列中时序相邻的视频。In some embodiments, the motion state of the shooting device corresponding to the end period of the first video in the video sequence matches the motion state of the shooting device corresponding to the start period of the second video, and the first The video and the second video are videos that are adjacent in time sequence in the video sequence.
在一些实施例中,视频序列中第一视频的结束时间段对应的所述拍摄装置的运动状态与第二视频的起始时间段对应的所述拍摄装置的运动状态相匹配,包括:所述第一视频的结束时间段对应的所述拍摄装置的运动方向与所述第二视频的起始时间段对应的所述拍摄装置的运动方向一致。In some embodiments, the motion state of the shooting device corresponding to the end time period of the first video in the video sequence matches the motion state of the shooting device corresponding to the start time period of the second video, including: The movement direction of the photographing device corresponding to the end time period of the first video is consistent with the movement direction of the photographing device corresponding to the start time period of the second video.
在一些实施例中,第一视频的结束时间段对应的所述拍摄装置的运动方向与第二视频的起始时间段对应的所述拍摄装置的运动方向一致,包括:所述第一视频对应的运动矢量与所述第二视频对应的运动矢量之间的夹角小于角度阈值以及所述第一视频对应的运动矢量的模的长度与所述第二视频对应的运动矢量的模的长度的比值小于比例阈值。In some embodiments, the movement direction of the shooting device corresponding to the end time period of the first video is consistent with the movement direction of the shooting device corresponding to the start time period of the second video, including: the first video corresponds to The angle between the motion vector corresponding to the second video and the motion vector corresponding to the second video is less than the angle threshold and the length of the modulus of the motion vector corresponding to the first video and the length of the modulus of the motion vector corresponding to the second video The ratio is less than the ratio threshold.
在一些实施例中,处理器还用于:获取多个原始视频;对所述多个原始视频进行划分,以得到所述多个视频。In some embodiments, the processor is further configured to: obtain multiple original videos; and divide the multiple original videos to obtain the multiple videos.
在一些实施例中,视频序列中时序相邻的两个视频属于不同的所述原始视频。In some embodiments, two videos that are adjacent in time sequence in the video sequence belong to different original videos.
在一些实施例中,所述处理器至少部分的基于所述视频序列,生成剪辑视频时,具体用于:获取节奏点序列;根据所述节奏点序列和所述视频序列,生成剪辑视频。In some embodiments, when the processor generates a clipped video based at least in part on the video sequence, it is specifically configured to: obtain a rhythm point sequence; and generate a clipped video according to the rhythm point sequence and the video sequence.
在一些实施例中,所述处理器根据所述节奏点序列和所述视频序列,生成剪辑视频时,包括:根据所述节奏点序列,确定所述视频序列是否满足预设条件;当所述视频序列满足预设条件时,对所述视频序列中的每个视频进行拼接以得到所述剪辑视频;当所述视频序列不满足预设条件时,调整所述视频序列中的视频的起始点或结束点得到调整后的视频,对所述调整后的视频进行拼接以得到所述剪辑视频。In some embodiments, when the processor generates a clipped video according to the rhythm point sequence and the video sequence, the method includes: determining whether the video sequence satisfies a preset condition according to the rhythm point sequence; When the video sequence meets a preset condition, splicing each video in the video sequence to obtain the clipped video; when the video sequence does not meet the preset condition, adjust the starting point of the video in the video sequence Or, the adjusted video is obtained at the end point, and the adjusted video is spliced to obtain the clipped video.
在一些实施例中,预设条件包括:所述视频序列中的视频的起始点或结束点与所述节奏点序列中的任一节奏点的时间间隔小于或等于预设时间阈值。In some embodiments, the preset condition includes: a time interval between a start point or an end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to a preset time threshold.
在一些实施例中,所述处理器调整所述视频的起始点或结束点得到调整后的视频时,具体用于:对所述视频进行裁剪、压缩或拉伸处理,以调整所述视频的起始点或结束点得到调整后的视频。In some embodiments, when the processor adjusts the start point or end point of the video to obtain an adjusted video, it is specifically configured to: perform cropping, compression, or stretching processing on the video to adjust the video The start point or end point is the adjusted video.
在一些实施例中,节奏点序列中的节奏点为周期性出现的鼓点。In some embodiments, the rhythm points in the sequence of rhythm points are drums that appear periodically.
在一些实施例中,所述拍摄装置的运动状态包括所述拍摄装置的运动方向、运动轨迹、运动速度、高度中的一个或多个。In some embodiments, the movement state of the photographing device includes one or more of the movement direction, movement trajectory, movement speed, and height of the photographing device.
在一些实施例中,所述拍摄装置设置于可移动平台,所述可移动平台包括无人机、自动驾驶车辆、手持稳定器。In some embodiments, the camera is provided on a movable platform, and the movable platform includes a drone, an autonomous vehicle, and a handheld stabilizer.
请参考图4,其示出了可以实现本申请实施例提供的方法的终端设备的结构示意图。Please refer to FIG. 4, which shows a schematic structural diagram of a terminal device that can implement the method provided in the embodiments of the present application.
终端设备包括处理器410、以存储器420形式的计算机程序产品或者计算机可读介质、显示屏430。存储器420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。The terminal device includes a processor 410, a computer program product or computer readable medium in the form of a memory 420, and a display screen 430. The memory 420 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
存储器420具有用于执行上述方法中的任何方法步骤的程序代码的存储空间。例如,用于程序代码的存储空间可以包括分别用于实现上面的方法中的各种步骤的各个程序代码。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为便携式或者固定存储单元。该存储单元可以具有与存储器420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码,即可以由例如诸如410之类的处理器读取的代码,这些代码当由终端设备运行时,导致该终端设备执行上面所描述的方法中的各个步骤。The memory 420 has a storage space for executing program codes of any method steps in the above methods. For example, the storage space for the program code may include various program codes respectively used to implement various steps in the above method. These program codes can be read from or written into one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are usually portable or fixed storage units. The storage unit may have storage segments, storage spaces, etc., arranged similarly to the memory 420. The program code can be compressed in an appropriate form, for example. Generally, the storage unit includes computer-readable codes, that is, codes that can be read by, for example, a processor such as 410, which, when run by a terminal device, cause the terminal device to perform each step in the method described above.
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的终端设备或遥控设备中的一些或者全部部件的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present application may be implemented by hardware, or by software modules running on one or more processors, or by a combination of them. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the terminal devices or remote control devices according to the embodiments of the present application. This application can also be implemented as a device or device program (for example, a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for realizing the present application may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本申请的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。The “one embodiment”, “an embodiment” or “one or more embodiments” referred to herein means that a specific feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. In addition, please note that the word examples "in one embodiment" here do not necessarily all refer to the same embodiment.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the instructions provided here, a lot of specific details are explained. However, it can be understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and technologies are not shown in detail, so as not to obscure the understanding of this specification.
在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可 将这些单词解释为名称。In the claims, any reference signs placed between parentheses should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of multiple such elements. The application can be realized by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims that list several devices, several of these devices may be embodied in the same hardware item. The use of the words first, second, and third, etc. do not indicate any order. These words can be interpreted as names.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (34)

  1. 一种视频剪辑方法,其特征在于,所述方法包括:A video editing method, characterized in that the method includes:
    获取多个视频,所述多个视频由拍摄装置拍摄得到;Acquiring multiple videos, the multiple videos being captured by a shooting device;
    获取所述多个视频中每个视频对应的所述拍摄装置的运动状态;Acquiring the motion state of the shooting device corresponding to each video in the plurality of videos;
    根据所述每个视频对应的所述拍摄装置的运动状态,对所述多个视频进行排序以确定视频序列;Sorting the plurality of videos to determine a video sequence according to the motion state of the shooting device corresponding to each video;
    至少部分的基于所述视频序列,生成剪辑视频。Based at least in part on the video sequence, a clipped video is generated.
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述多个视频中每个视频对应的所述拍摄装置的运动状态,包括:The method according to claim 1, wherein the acquiring the motion state of the shooting device corresponding to each video in the plurality of videos comprises:
    获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。Acquire the motion state of the shooting device corresponding to each video in the start time period and the motion state of the shooting device corresponding to the end time period of each video in the plurality of videos.
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态,包括:The method according to claim 2, wherein said acquiring the motion state of the shooting device corresponding to each video of the plurality of videos at the start time period and the status of the shooting device corresponding to the end time period Movement status, including:
    获取所述每个视频中起始时间段的视频帧和结束时间段的视频帧;Acquiring a video frame in the start time period and a video frame in the end time period in each video;
    根据所述起始时间段的视频帧和所述结束时间段的视频帧,确定所述每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。According to the video frame of the start time period and the video frame of the end time period, determine the motion state of the shooting device corresponding to the start time period of each video and the shooting device corresponding to the end time period The state of exercise.
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述起始时间段的视频帧和所述结束时间段的视频帧,确定所述每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态,包括:The method according to claim 3, wherein the video frame of the start time period and the video frame of the end time period are used to determine the corresponding video frame of each video in the start time period. The motion state of the photographing device and the motion state of the photographing device corresponding to the end time period include:
    获取所述起始时间段的视频帧的特征点;Acquiring feature points of the video frame of the start time period;
    对所述起始时间段的视频帧的特征点进行特征点匹配,得到所述起始时间段对应的所述拍摄装置的运动状态;Performing feature point matching on the feature points of the video frame in the initial time period to obtain the motion state of the photographing device corresponding to the initial time period;
    获取所述结束时间段的视频帧的特征点;Acquiring feature points of the video frame of the end time period;
    对所述结束时间段的视频帧的特征点进行特征点匹配,得到所述结束时间段对应的所述拍摄装置的运动状态。Feature point matching is performed on the feature points of the video frame of the end time period to obtain the motion state of the photographing device corresponding to the end time period.
  5. 根据权利要求2所述的方法,其特征在于,所述拍摄装置通过云台安装于可移动平台,所述拍摄装置设置有惯性测量单元,所述获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态,包括:The method according to claim 2, wherein the photographing device is installed on a movable platform through a pan/tilt, the photographing device is provided with an inertial measurement unit, and the acquisition of each of the multiple videos is in the beginning. The motion state of the photographing device corresponding to the start time period and the motion state of the photographing device corresponding to the end time period include:
    获取所述惯性测量单元的测量数据和所述云台的姿态角以确定所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结‐19‐ 束时间段对应的所述拍摄装置的运动状态。Obtain the measurement data of the inertial measurement unit and the attitude angle of the pan/tilt to determine the motion state and end time period of the camera corresponding to each video in the multiple videos at the start time period Corresponding to the motion state of the photographing device.
  6. 根据权利要求1-5之一所述的方法,其特征在于,所述视频序列中第一视频的结束时间段对应的所述拍摄装置的运动状态与第二视频的起始时间段对应的所述拍摄装置的运动状态相匹配,所述第一视频和所述第二视频为所述视频序列中时序相邻的视频。The method according to any one of claims 1-5, wherein the motion state of the shooting device corresponding to the end time period of the first video in the video sequence corresponds to the start time period of the second video. The motion state of the shooting device matches, and the first video and the second video are videos that are adjacent in time sequence in the video sequence.
  7. 根据权利要求6所述的方法,其特征在于,所述视频序列中第一视频的结束时间段对应的所述拍摄装置的运动状态与第二视频的起始时间段对应的所述拍摄装置的运动状态相匹配,包括:The method according to claim 6, wherein the motion state of the shooting device corresponding to the end time period of the first video in the video sequence and the motion state of the shooting device corresponding to the start time period of the second video Match the movement status, including:
    所述第一视频的结束时间段对应的所述拍摄装置的运动方向与所述第二视频的起始时间段对应的所述拍摄装置的运动方向一致。The movement direction of the photographing device corresponding to the end time period of the first video is consistent with the movement direction of the photographing device corresponding to the start time period of the second video.
  8. 根据权利要求7所述的方法,其特征在于,所述第一视频的结束时间段对应的所述拍摄装置的运动方向与第二视频的起始时间段对应的所述拍摄装置的运动方向一致,包括:The method according to claim 7, wherein the movement direction of the photographing device corresponding to the end time period of the first video is consistent with the movement direction of the photographing device corresponding to the start time period of the second video ,include:
    所述第一视频的结束时间段对应的所述拍摄装置的运动矢量与所述第二视频的起始时间段对应的所述拍摄装置的运动矢量之间的夹角小于角度阈值以及所述第一视频的结束时间段对应的所述拍摄装置的运动矢量的模的长度与所述第二视频的起始时间段对应的所述拍摄装置的运动矢量的模的长度的比值小于比例阈值。The angle between the motion vector of the camera corresponding to the end period of the first video and the motion vector of the camera corresponding to the start period of the second video is smaller than the angle threshold and the first The ratio of the length of the modulus of the motion vector of the camera corresponding to the end time period of a video to the modulus of the length of the motion vector of the camera corresponding to the start time period of the second video is smaller than the ratio threshold.
  9. 根据权利要求1所述的方法,其特征在于,所述获取多个视频之前,所述方法还包括:The method according to claim 1, wherein before said acquiring multiple videos, the method further comprises:
    获取多个原始视频;Get multiple original videos;
    对所述多个原始视频进行划分,以得到所述多个视频。The multiple original videos are divided to obtain the multiple videos.
  10. 根据权利要求9所述的方法,其特征在于,所述视频序列中时序相邻的两个视频属于不同的所述原始视频。The method according to claim 9, wherein the two videos that are adjacent in time sequence in the video sequence belong to different original videos.
  11. 根据权利要求1所述的方法,其特征在于,所述至少部分的基于所述视频序列,生成剪辑视频,包括:The method of claim 1, wherein the generating a clipped video based at least in part on the video sequence comprises:
    获取节奏点序列;Obtain a sequence of rhythm points;
    根据所述节奏点序列和所述视频序列,生成剪辑视频。According to the rhythm point sequence and the video sequence, a clipped video is generated.
  12. 根据权利要求11所述的方法,其特征在于,所述根据所述节奏点序列和所述视频序列,生成剪辑视频,包括:The method according to claim 11, wherein the generating a clipped video according to the rhythm point sequence and the video sequence comprises:
    根据所述节奏点序列,确定所述视频序列是否满足预设条件;Determine whether the video sequence meets a preset condition according to the rhythm point sequence;
    当所述视频序列满足预设条件时,对所述视频序列中的每个视频进 行拼接以得到所述剪辑视频;When the video sequence meets a preset condition, splicing each video in the video sequence to obtain the clipped video;
    当所述视频序列不满足预设条件时,调整所述视频序列中的视频的起始点或结束点得到调整后的视频,对所述调整后的视频进行拼接以得到所述剪辑视频。When the video sequence does not meet the preset condition, adjusting the start point or the end point of the video in the video sequence to obtain an adjusted video, and splicing the adjusted video to obtain the clip video.
  13. 根据权利要求12所述的方法,其特征在于,所述预设条件包括:The method according to claim 12, wherein the preset condition comprises:
    所述视频序列中的视频的起始点或结束点与所述节奏点序列中的任一节奏点的时间间隔小于或等于预设时间阈值。The time interval between the start point or the end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to a preset time threshold.
  14. 根据权利要求12或13所述的方法,其特征在于,所述调整所述视频的起始点或结束点得到调整后的视频,包括:The method according to claim 12 or 13, wherein the adjusting the start point or the end point of the video to obtain the adjusted video comprises:
    对所述视频进行裁剪、压缩或拉伸处理,以调整所述视频的起始点或结束点得到调整后的视频。The video is cropped, compressed or stretched to adjust the start point or end point of the video to obtain an adjusted video.
  15. 根据权利要求11所述的方法,其特征在于,所述节奏点序列中的节奏点为周期性出现的鼓点。The method according to claim 11, wherein the rhythm points in the rhythm point sequence are drums that appear periodically.
  16. 根据权利要求1所述的方法,其特征在于,所述拍摄装置的运动状态包括所述拍摄装置的运动方向、运动轨迹、运动速度、高度中的一个或多个。The method according to claim 1, wherein the movement state of the photographing device includes one or more of the movement direction, the movement track, the movement speed, and the height of the photographing device.
  17. 根据权利要求1所述的方法,其特征在于,所述拍摄装置设置于可移动平台,所述可移动平台包括无人机、自动驾驶车辆、手持稳定器。The method according to claim 1, wherein the camera is provided on a movable platform, and the movable platform includes an unmanned aerial vehicle, an autonomous driving vehicle, and a handheld stabilizer.
  18. 一种终端设备,其特征在于,所述终端设备包括处理器,所述处理器用于:A terminal device, characterized in that the terminal device includes a processor, and the processor is configured to:
    获取多个视频,所述多个视频由拍摄装置拍摄得到;Acquiring multiple videos, the multiple videos being captured by a shooting device;
    获取所述多个视频中每个视频对应的所述拍摄装置的运动状态;Acquiring the motion state of the shooting device corresponding to each video in the plurality of videos;
    根据所述每个视频对应的所述拍摄装置的运动状态,对所述多个视频进行排序以确定视频序列;Sorting the plurality of videos to determine a video sequence according to the motion state of the shooting device corresponding to each video;
    至少部分的基于所述视频序列,生成剪辑视频。Based at least in part on the video sequence, a clipped video is generated.
  19. 根据权利要求18所述的终端设备,其特征在于,所述处理器在获取所述多个视频中每个视频对应的所述拍摄装置的运动状态时,具体用于:The terminal device according to claim 18, wherein the processor is specifically configured to: when acquiring the motion state of the shooting device corresponding to each video in the plurality of videos:
    获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。Acquire the motion state of the shooting device corresponding to each video in the start time period and the motion state of the shooting device corresponding to the end time period of each video in the plurality of videos.
  20. 根据权利要求19所述的终端设备,其特征在于,所述处理器在 获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态时,具体用于:The terminal device according to claim 19, wherein the processor acquires the motion state of the shooting device corresponding to the start time period of each video in the plurality of videos and the end time period corresponding to the motion state of each video in the plurality of videos. When describing the motion state of the camera, it is specifically used for:
    获取所述每个视频中起始时间段的视频帧和结束时间段的视频帧;Acquiring a video frame in the start time period and a video frame in the end time period in each video;
    根据所述起始时间段的视频帧和所述结束时间段的视频帧,确定所述每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态。According to the video frame of the start time period and the video frame of the end time period, determine the motion state of the shooting device corresponding to the start time period of each video and the shooting device corresponding to the end time period The state of exercise.
  21. 根据权利要求20所述的终端设备,其特征在于,所述处理器在根据所述起始时间段的视频帧和所述结束时间段的视频帧,确定所述每个视频在起始时间段对应的所述拍摄装置的运动状态和结束时间段对应的所述拍摄装置的运动状态时,具体用于:The terminal device according to claim 20, wherein the processor determines that each video is in the start time period according to the video frame in the start time period and the video frame in the end time period. The corresponding motion state of the photographing device and the motion state of the photographing device corresponding to the end time period are specifically used for:
    获取所述起始时间段的视频帧的特征点;Acquiring feature points of the video frame of the start time period;
    对所述起始时间段的视频帧的特征点进行特征点匹配,得到所述起始时间段对应的所述拍摄装置的运动状态;Performing feature point matching on the feature points of the video frame in the initial time period to obtain the motion state of the photographing device corresponding to the initial time period;
    获取所述结束时间段的视频帧的特征点;Acquiring feature points of the video frame of the end time period;
    对所述结束时间段的视频帧的特征点进行特征点匹配,得到所述结束时间段对应的所述拍摄装置的运动状态。Feature point matching is performed on the feature points of the video frame of the end time period to obtain the motion state of the photographing device corresponding to the end time period.
  22. 根据权利要求19所述的终端设备,其特征在于,所述拍摄装置通过云台安装于可移动平台,所述拍摄装置设置有惯性测量单元;The terminal device according to claim 19, wherein the photographing device is installed on a movable platform through a pan-tilt, and the photographing device is provided with an inertial measurement unit;
    所述处理器在获取所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和所述结束时间段对应的所述拍摄装置的运动状态时,具体用于:When the processor acquires the motion state of the shooting device corresponding to the start time period and the motion state of the shooting device corresponding to the end time period of each video in the plurality of videos, it is specifically configured to:
    获取所述惯性测量单元的测量数据和所述云台的姿态角以确定所述多个视频中每个视频在起始时间段对应的所述拍摄装置的运动状态和所述结束时间段对应的所述拍摄装置的运动状态。Obtain the measurement data of the inertial measurement unit and the attitude angle of the pan/tilt to determine the motion state of the shooting device corresponding to the start time period of each video in the plurality of videos and the corresponding end time period The motion state of the photographing device.
  23. 根据权利要求18-22之一所述的终端设备,其特征在于,所述视频序列中第一视频的结束时间段对应的所述拍摄装置的运动状态与第二视频的起始时间段对应的所述拍摄装置的运动状态相匹配,所述第一视频和所述第二视频为所述视频序列中时序相邻的视频。The terminal device according to any one of claims 18-22, wherein the motion state of the shooting device corresponding to the end time period of the first video in the video sequence corresponds to the start time period of the second video The motion state of the shooting device matches, and the first video and the second video are videos that are adjacent in time sequence in the video sequence.
  24. 根据权利要求23所述的终端设备,其特征在于,所述视频序列中第一视频的结束时间段对应的所述拍摄装置的运动状态与第二视频的起始时间段对应的所述拍摄装置的运动状态相匹配,包括:The terminal device according to claim 23, wherein the motion state of the shooting device corresponding to the end time period of the first video in the video sequence is the same as the shooting device corresponding to the start time period of the second video Match the state of motion, including:
    所述第一视频的结束时间段对应的所述拍摄装置的运动方向与所述第二视频的起始时间段对应的所述拍摄装置的运动方向一致。The movement direction of the photographing device corresponding to the end time period of the first video is consistent with the movement direction of the photographing device corresponding to the start time period of the second video.
  25. 根据权利要求24所述的终端设备,其特征在于,所述第一视频 的结束时间段对应的所述拍摄装置的运动方向与第二视频的起始时间段对应的所述拍摄装置的运动方向一致,包括:The terminal device according to claim 24, wherein the movement direction of the photographing device corresponding to the end time period of the first video and the movement direction of the photographing device corresponding to the start time period of the second video Consistent, including:
    所述第一视频的结束时间段对应的所述拍摄装置的运动矢量与所述第二视频的起始时间段对应的所述拍摄装置的运动矢量之间的夹角小于角度阈值以及所述第一视频的结束时间段对应的所述拍摄装置的运动矢量的模的长度与所述第二视频的起始时间段对应的所述拍摄装置的运动矢量的模的长度的比值小于比例阈值。The angle between the motion vector of the camera corresponding to the end period of the first video and the motion vector of the camera corresponding to the start period of the second video is smaller than the angle threshold and the first The ratio of the length of the modulus of the motion vector of the camera corresponding to the end time period of a video to the modulus of the length of the motion vector of the camera corresponding to the start time period of the second video is smaller than the ratio threshold.
  26. 根据权利要求18所述的终端设备,其特征在于,所述处理器还用于:The terminal device according to claim 18, wherein the processor is further configured to:
    获取多个原始视频;Get multiple original videos;
    对所述多个原始视频进行划分,以得到所述多个视频。The multiple original videos are divided to obtain the multiple videos.
  27. 根据权利要求26所述的终端设备,其特征在于,所述视频序列中时序相邻的两个视频属于不同的所述原始视频。The terminal device according to claim 26, wherein two videos that are adjacent in time sequence in the video sequence belong to different original videos.
  28. 根据权利要求18所述的终端设备,其特征在于,所述处理器至少部分的基于所述视频序列,生成剪辑视频时,具体用于:The terminal device according to claim 18, wherein the processor is specifically configured to: when generating a clipped video based at least in part on the video sequence:
    获取节奏点序列;Obtain a sequence of rhythm points;
    根据所述节奏点序列和所述视频序列,生成剪辑视频。According to the rhythm point sequence and the video sequence, a clipped video is generated.
  29. 根据权利要求28所述的终端设备,其特征在于,所述处理器根据所述节奏点序列和所述视频序列,生成剪辑视频时,具体用于:The terminal device according to claim 28, wherein the processor is specifically configured to: when generating a clipped video according to the rhythm point sequence and the video sequence:
    根据所述节奏点序列,确定所述视频序列是否满足预设条件;Determine whether the video sequence meets a preset condition according to the rhythm point sequence;
    当所述视频序列满足预设条件时,对所述视频序列中的每个视频进行拼接以得到所述剪辑视频;When the video sequence meets a preset condition, splicing each video in the video sequence to obtain the clipped video;
    当所述视频序列不满足预设条件时,调整所述视频序列中的视频的起始点或结束点得到调整后的视频,对所述调整后的视频进行拼接以得到所述剪辑视频。When the video sequence does not meet the preset condition, adjusting the start point or the end point of the video in the video sequence to obtain an adjusted video, and splicing the adjusted video to obtain the clip video.
  30. 根据权利要求29所述的终端设备,其特征在于,所述预设条件包括:The terminal device according to claim 29, wherein the preset condition comprises:
    所述视频序列中的视频的起始点或结束点与所述节奏点序列中的任一节奏点的时间间隔小于或等于预设时间阈值。The time interval between the start point or the end point of the video in the video sequence and any rhythm point in the rhythm point sequence is less than or equal to a preset time threshold.
  31. 根据权利要求29或30所述的终端设备,其特征在于,所述处理器调整所述视频的起始点或结束点得到调整后的视频时,具体用于:The terminal device according to claim 29 or 30, wherein when the processor adjusts the start point or end point of the video to obtain an adjusted video, it is specifically configured to:
    对所述视频进行裁剪、压缩或拉伸处理,以调整所述视频的起始点或结束点得到调整后的视频。The video is cropped, compressed or stretched to adjust the start point or end point of the video to obtain an adjusted video.
  32. 根据权利要求28所述的终端设备,其特征在于,所述节奏点序列中的节奏点为周期性出现的鼓点。The terminal device according to claim 28, wherein the rhythm points in the rhythm point sequence are drum beats that appear periodically.
  33. 根据权利要求18所述的终端设备,其特征在于,所述拍摄装置的运动状态包括所述拍摄装置的运动方向、运动轨迹、运动速度、高度中的一个或多个。The terminal device according to claim 18, wherein the movement state of the photographing device includes one or more of the movement direction, the movement track, the movement speed, and the height of the photographing device.
  34. 根据权利要求18所述的终端设备,其特征在于,所述拍摄装置设置于可移动平台,所述可移动平台包括无人机、自动驾驶车辆、手持稳定器。The terminal device according to claim 18, wherein the photographing device is set on a movable platform, and the movable platform includes an unmanned aerial vehicle, an autonomous driving vehicle, and a handheld stabilizer.
PCT/CN2019/108264 2019-09-26 2019-09-26 Video editing method, and terminal apparatus WO2021056353A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/108264 WO2021056353A1 (en) 2019-09-26 2019-09-26 Video editing method, and terminal apparatus
CN201980032384.6A CN112166599A (en) 2019-09-26 2019-09-26 Video editing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/108264 WO2021056353A1 (en) 2019-09-26 2019-09-26 Video editing method, and terminal apparatus

Publications (1)

Publication Number Publication Date
WO2021056353A1 true WO2021056353A1 (en) 2021-04-01

Family

ID=73859691

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/108264 WO2021056353A1 (en) 2019-09-26 2019-09-26 Video editing method, and terminal apparatus

Country Status (2)

Country Link
CN (1) CN112166599A (en)
WO (1) WO2021056353A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113940087A (en) * 2020-09-24 2022-01-14 深圳市大疆创新科技有限公司 Video editing method, electronic equipment, unmanned aerial vehicle and storage medium
CN115379115A (en) * 2022-07-29 2022-11-22 黑芝麻智能科技(成都)有限公司 Video shooting method and device and electronic equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099266B (en) * 2021-04-02 2023-05-26 云从科技集团股份有限公司 Video fusion method, system, medium and device based on unmanned aerial vehicle POS data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107333176A (en) * 2017-08-14 2017-11-07 北京百思科技有限公司 The method and system that a kind of distributed video is rendered
CN107393569A (en) * 2017-08-16 2017-11-24 成都品果科技有限公司 Audio frequency and video clipping method and device
WO2018124794A1 (en) * 2016-12-30 2018-07-05 (주)잼투고 Camerawork-based image synthesis system and image synthesis method
CN108702464A (en) * 2017-10-16 2018-10-23 深圳市大疆创新科技有限公司 A kind of method for processing video frequency, control terminal and movable equipment
CN109819338A (en) * 2019-02-22 2019-05-28 深圳岚锋创视网络科技有限公司 A kind of automatic editing method, apparatus of video and portable terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9992528B2 (en) * 2013-06-10 2018-06-05 Ani-View Ltd. System and methods thereof for displaying video content

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124794A1 (en) * 2016-12-30 2018-07-05 (주)잼투고 Camerawork-based image synthesis system and image synthesis method
CN107333176A (en) * 2017-08-14 2017-11-07 北京百思科技有限公司 The method and system that a kind of distributed video is rendered
CN107393569A (en) * 2017-08-16 2017-11-24 成都品果科技有限公司 Audio frequency and video clipping method and device
CN108702464A (en) * 2017-10-16 2018-10-23 深圳市大疆创新科技有限公司 A kind of method for processing video frequency, control terminal and movable equipment
CN109819338A (en) * 2019-02-22 2019-05-28 深圳岚锋创视网络科技有限公司 A kind of automatic editing method, apparatus of video and portable terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113940087A (en) * 2020-09-24 2022-01-14 深圳市大疆创新科技有限公司 Video editing method, electronic equipment, unmanned aerial vehicle and storage medium
CN115379115A (en) * 2022-07-29 2022-11-22 黑芝麻智能科技(成都)有限公司 Video shooting method and device and electronic equipment
CN115379115B (en) * 2022-07-29 2024-05-14 黑芝麻智能科技(成都)有限公司 Video shooting method and device and electronic equipment

Also Published As

Publication number Publication date
CN112166599A (en) 2021-01-01

Similar Documents

Publication Publication Date Title
US10554850B2 (en) Video ingestion and clip creation
WO2021056353A1 (en) Video editing method, and terminal apparatus
US11810597B2 (en) Video ingestion and clip creation
CN108369816B (en) Apparatus and method for creating video clips from omnidirectional video
US9407804B2 (en) Method, apparatus, and non-transitory medium for generating a synthetic image from a series of captured images
US8896626B2 (en) Image capturing apparatus, image processing apparatus, control method thereof and program
US10110850B1 (en) Systems and methods for directing content generation using a first-person point-of-view device
US8111297B2 (en) Image processing apparatus, program, and method for performing preprocessing for movie reproduction of still images
US8873861B2 (en) Video processing apparatus and method
JP4541149B2 (en) Method and apparatus for editing source video
TW200536389A (en) Intelligent key-frame extraction from a video
WO2021139728A1 (en) Panoramic video processing method, apparatus, device, and storage medium
US10726272B2 (en) Systems and methods for generating a video summary
KR101519576B1 (en) Method and apparatus for correcting rotation of video frames
WO2019227324A1 (en) Method and device for controlling video playback speed and motion camera
CN110225401B (en) Video playing method and device capable of adjusting visual angle
JP2008023036A (en) Program for checking and analyzing swing form of golf or the like
US20200092444A1 (en) Playback method, playback device and computer-readable storage medium
JP2009055156A (en) Image reproducing device, imaging device, image reproducing method, and computer program
WO2023189079A1 (en) Image processing device, image processing method, and program
CN112887588B (en) Method and apparatus for generating video
CN104731335B (en) One kind plays content conditioning method and electronic equipment
JP7506492B2 (en) Image capture systems and camera equipment
Vanherle et al. Automatic Camera Control and Directing with an Ultra-High-Definition Collaborative Recording System
JP2016058793A5 (en)

Legal Events

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

Ref document number: 19947342

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19947342

Country of ref document: EP

Kind code of ref document: A1