CPC H04N 21/44008 (2013.01) [H04N 21/440245 (2013.01); H04N 21/440281 (2013.01)] | 18 Claims |
1. A panoramic video editing method, comprising:
acquiring a panoramic video shot by a panoramic camera, and recording a viewing angle at a forward direction of the panoramic camera in the process of moving for shooting;
performing frame extraction operation on the acquired panoramic video to obtain corresponding panoramic video frames, performing salient object detection on the panoramic video frames tracking the detected salient object by a preset object tracking algorithm, and acquiring a viewing angle of the tracked salient object;
according to the viewing angle at the forward direction and the viewing angle of the salient object, editing the panoramic video to generate an object video corresponding to the panoramic video;
wherein the step of according to the viewing angle at the forward direction and the viewing angle of salient object, editing the panoramic video to generate an object video corresponding to the panoramic video comprises:
traversing the panoramic video frames of the panoramic video, and in response to the panoramic video frames without salient object, editing lens images corresponding to the viewing angle at the forward direction in the panoramic video frames, and setting a playing speed of the lens images,
in response to the panoramic video frames with the salient object, determining to edit lens images of the viewing angle of each salient object in the panoramic video frames according to the number of frames in which each salient object is detected, and setting the playing speed of the lens images,
wherein the step of determining to edit lens images of the viewing angle of each salient object in the panoramic video frames according to the number of frames in which each salient object is detected, and setting the playing speed of the lens images comprises:
determining a number of frames in which each salient object is continuously tracked, and
in response to the number of frames is less than a set threshold,
editing lens images corresponding to the viewing angle at the forward direction in the panoramic video frames, and setting the playing speed of the lens images to be fast playing;
in response to the number of frames is greater than the set threshold,
editing lens images corresponding to the transition from the viewing angle at the forward direction to the viewing angle of the salient object in the panoramic video frames in a first time period, setting the playing speed of the lens images to be fast playing,
editing lens images corresponding to the viewing angle of the salient object in the panoramic video frames in a second time period, setting the playing speed of the lens images to be slow playing,
editing lens images corresponding to the transition from the viewing angle of the salient object to the viewing angle at the forward direction in the panoramic video frames in a third time period, and setting the playing speed of the lens images to be fast playing;
generating an object video corresponding to the panoramic video according to the edited lens images and the corresponding playing speed that is set.
|