Optical Flow Renderings
Optical flow renderings is my final project in 6.866, Machine
Vision. I implemented in Java an algorithm for calculating optical flow
data designed by Professor
B.K. Horn. Optical flow is a measure of the apparent flow of brightness
in a sequence of images. A flow vector is calculated at points between
pixels and between frames of a movie clip.
I then used this data to create artistic renderings of
the movie. I had hoped that the renderings I designed would be clearer,
but it did not turn out that optical flow leads to very visually coherent
results. They are still interesting to look at though, and provide a clear
understanding of the results of the optical flow algorithm.
The algorithm is iterative, very slow, and takes up lots
of memory. Therefore, the clips I processed were necessarily small and
short.
Rendering styles:
-
Needle diagram: every fifth optical flow vector is
sampled. A point is drawn at the source of the vector, and the vector itself
is drawn.
-
Heat rendering: A color is assigned to the different
magnitudes of optical flow vectors. Hotter colors correspond to longer
vectors.
-
Flicker rendering: Every third vector is considered.
If the magnitude of the vector is in the top third out of all non-zero
vectors, it is drawn.
Note: most clips are MPEG's, the heat renderings are Quicktime since
MPEG couldn't handle the colors correctly.