Try checking out this link
TrackEye : Real-Time Tracking Of Human Eyes Using a Webcam[
^]
I understand what you are trying to do.But instead of detecting rapid eye blinks why not detect whether one closes a right or left eye instead. With this suggestion, you need to detect faces first, see this link on how you can train a haar classifier to detect objects.
http://note.sonots.com/SciSoftware/haartraining.html[
^]
Then you can train a second set of classifiers to scan only those detected regions for right and left eye. You can use two classifiers, one should detect closed eyes and the other open eyes, and just using a simple geometric constraint your system can tell whether the eye is on the right or left side,and based on the two classifier outputs the system can tell whether either eye is open or closed and it could output control signals based on that.
See also a tutorial code for openCV 2.3
https://code.ros.org/svn/opencv/trunk/opencv/samples/cpp/tutorial_code/objectDetection/objectDetection.cpp[
^]
Hope this helps.