automatic looping of image sequence using optical flow
C++/OpenCV (> 4.2.0)
tested on Ubuntu 18.04 (KDE Neon)
choose first and last frame of the loop (loop zone). (to get invisible results they obviously must be as similar as possible). cut in half and swap the 2 parts. (the offensive cut is now in the middle of the loop). fade A towards B around the middle frame. (notice that you will use some frames before and after the loop)
using opticalflow for the fade :
bidirectional opticalflow vector fields from pair frames of A/B are generated in .flo format.they are used to warp frameA to frameB and vice-versa.each warped frames are then blended , generating a flow driven morphing.