Eyeblink detection algorithm. Eyeblinks are determined
from the EOG by identifying in z[k] a negative
peak followed by a positive peak within the desired time
window. Ofnote are the areas under the negative and positive
peaks in the processed EOG signal z[k] that correspond
to the magnitudes of the negative and positive
slopes in the original EOG signal x[k], and the peak positions
roughly correspond to the midpoints of eyelid closure
and reopening that define the eyeblink duration (Veltman
& Gaillard, 1996).