In OpenCV, there are several methods to identify the eyes - you can start with this article . Pupil you have to look for yourself, selecting a fragment of the frame corresponding to the eye. It will be quite easy to find the center of the pupil along the gradient - look for pixels right and left from the center of the eye until you get to the protein - here’s the eyeball, well, as an example on the forehead. Difficulties will be of a completely different level - it will be impossible to establish with sufficient accuracy the angles of rotation and tilt of the head from a monocular image.
To solve your problem, you need first of all a 3D-reconstruction of the head position (coordinates and posture) relative to the camera, and then the pupil ...