I am using Haar cascade classifiers to detect eyes from the webcam. I don't want to display what the webcam is capturing. This is part of a project for eye movement analysis. I want to know where on screen the user is looking. if I display the window showing their face, they inevitably tend to look only at that part of the screen where this window is.
I tried removing the statement
cv2.imshow('frame', frame)
But the next statement
if cv2.waitKey(1) & 0xFF == ord('q'):
break
seems to be causing a problem. So I replaced it with
cv2.waitKey(delay=5000)
break
But it does not wait for the specified delay time and goes on to executing the next statements, which I do not want.
What am I doing wrong and how do I fix it? I am using python 2.7.9 and openCV 2.4.9