Hello.

It is necessary to determine the position of the pupil using the front camera. Android provides methods for determining the center of the left (right) eye. And how can you follow the movement of the pupil? Perhaps someone faced with such a task, tell me where to dig.

Thank.

  • It is necessary to display a finely ribbed image on the screen for a start, otherwise the pupil will constantly twitch when moving ... and there will be no sense about the situation :-) - Chad

2 answers 2

Use the computer vision library OpenCV for Android.

  • We assume that the phrase “tell me where to dig” gave you a blank check for a one-line answer. Usually this is recommended for removal due to length. Or written in the comments . Ok, "looks fine" and even upvote. - AK
  • one
    @AK, ok I will know. At the time of writing the answer, I did not have the appropriate privileges to comment on the questions. - SolderingIronMen

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 ...