In a mesmerizing video, a researcher explains the math behind what seems like magic — photographs in which the view is obscured by things like chain-link fences and reflections become free of clutter with just a few clicks.

Researchers at MIT and Google have created an algorithm that uses multiple images taken from different angles to separate foreground obstacles from the subject that's in the background — anything from your favorite view or a sign in a window on a bright day.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.