A fast quasi-dense matching algorithm with an adaptive window