Due to the mutual restriction between stitching effect and stitching time, which makes the video stitching algorithm unable to achieve low-time and high-quality stitching at the same time. To solve this problem, this paper proposes a new fast video stitching algorithm based on adaptive key frames extraction, which makes full use of the information redundancy of video sequence. Firstly, two methods based on fixed frame interval and based on global information are combined to extract video key frames to realize the similarity division between frames. The average optical flow of all past frames is used as the similarity threshold to achieve adaptive inter-frame similarity division. Furthermore, sparse optical flow estimation based on brightness compensation is used to track the feature point pairs of the inter-frame sequence, and a look-up table of feature point pairs is established. Finally, the matching point pairs of the past frame are directly propagated to the current frame by using the inheritance method of feature optical flow, and then stitched together. Experiments show that the algorithm proposed in this paper can reduce the time consumption by 31.8%, 24.4% and 24.1% compared with OpenCV in three different scenarios, and the PSNR can be improved by up to 13.27 compared with PTGUI in terms of stitching performance. Therefore, the algorithm achieves fast and high-quality video stitching, and is robust and stable to environmental and illumination changes.
|