I am writing a code for eye tracker using OS X / X Code / OpenCV 2.2. As part of the Eye Tracker training process, I am using cvSetMouseCallback to capture the data as per f
try to remove this line:
cvSetMouseCallback( "video", my_mouse_callback, (void*) img);
from the loop and place it immediately after:
cvNamedWindow( "video", 1 );
Regards !