We will say that a video segment loops well when its first and last video frames are very similar.
It's a reasonable approximation. However really perfect loops have not only matching positions of the objects but perfect speeds too. I would calculate optical flows and compare them at the first and the last frames too and somehow put it into the distance function.
One example: this algorithm would find the half period of a pendulum perfectly loop. Taking optical flows into account would fix this.
Yes. For instance, suppose a point-like object is moving on a flat plane, in a repeating figure eight path. The ideal repetition unit is one cycle of the entire figure eight. But by the frame similarity heuristic, we will find that the cross in the figure eight creates two identical positions which give rise to a half-cycle of the figure eight also being considered viable. In this half cycle, the point abruptly changes direction at the cusp of a tear-drop path.
I was hoping Microsoft would turn this into a product.
They did bring Cliplets[1] and eventually the Cinemagraph app for Windows Phones[2], but neither of those have any intelligence to them.
The only benefit they provide over a video editor is that you can paint a mask to specify the area of the video to loop. The loops still turn out jumpy, unless you do all the manual work, as mentioned in the article itself.
The automated video looping paper is a fascinating one… much better … however it's patented. Anybody knows what is the position of Microsoft about the patents they own and describe in their research paper ?
This so called pingpong style method can create a loop out of any source material, but the result will most likely look unnatural since you're reusing frames and it only works quite convincingly for pendular motions. The method described here finds naturally appearing loop candidates in any video stream and is way more flexible.
Do you have HTTPS Everywhere installed? Their JavaScript is hosted on HTTP, so it gets blocked with a mixed content warning on Firefox (probably on Chrome too).
With a better, faster algorithm, probably with some help from a GPU, this could become a new app. There's already "http://loopc.am/", but it's not as good. Then cash out by selling out to Instagram. Also use to jazz up real estate ads.
Isn't this just k-NN? I mean: one can reduce this problem to k-NN by first loading the database with all video frames, and then performing queries using frame 0, frame 1, etc.
There are good tree algorithms[0] and implementations[1][2] for executing k-NN queries. These implementations also exploit the properties of the triangle inequality.
Slightly misleading to say the summed colour value difference between the frames a distance that's analogous to a geometric distance, geometric distance measures on data with high numbers of dimensions becomes useless, as the dimensionality increases the difference between 'near' and 'far' tends towards zero.
It's a reasonable approximation. However really perfect loops have not only matching positions of the objects but perfect speeds too. I would calculate optical flows and compare them at the first and the last frames too and somehow put it into the distance function.
One example: this algorithm would find the half period of a pendulum perfectly loop. Taking optical flows into account would fix this.