The video shows a blinks detection system which uses a method for comparing two images by similarity. The upper box represents a sequence of images at video rate, the second box is a reference image or pattern. Below a graph is displayed with a similarity value in the range [-1, +1]. The similarity is a measure of resemblance between each image in the sequence and the pattern. You can see how the similarity jumps with each blink.
In the left figure bellow the system detects two blinks. In the first blink, the eye is closed by six frames (180 msec.), and in the second blink by ten frames (300 msec.). It is noted that the graph defines events open eye and closed eye with good precision.
As shown in the three figures below, the detector works equally well using a reference image of the same patient (left) using an image taken from Internet (center) or using a synthetic object (right).