2. Once ROI is selected, one can apply a function to extract feature. Here first (canny) edge-detection, find contour and merge them, after generate a convex hull from merged contour is applied to locate pupil.
The script extract_with_anime.py generates the movie which is linked with post. This is for demo purpose, it slows down the whole process by a factor of 100. The matplotlib.animation is pretty easy to use by its animation speed is quite slow.