• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mapping eye movements

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i've been working on a project, aiming to move the mouse cursor with the movement of the eye...capturing images via a web cam.
i've completed the face detection and the eye detection. Can you give me some idea of implementing the mapping of the eye movements onto the mouse cursor or maybe some references?? its done using java.

Thanks.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Java class that can move the mouse pointer around is "java.awt.Robot".
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Nacho]: i've completed the face detection and the eye detection.

Well, can you find the location of pupils in an image? I would think that one of the most useful things to do would be to detect relative movements of the pupils from image to image. Figuring out the absolute position of everything using trigonometry would be hard (there are many unknowns), but if you can at least detect relative movements, then you can move the cursor up when the pupil moves up, left when the pupil moves left, etc. Then there's a question of how much to move the cursor in response to each movement, but with luck this can be handled with a simple multiplier that you determine through experimentation.

As I think about it though, tracking only relative movement may be limiting and confusing. Some of the time the user may be moving their eyes onto the cursor rather than trying to guide it, which requires a completely different response.

If you have a good enough image, you may benefit from analyzing the shape of the pupils, which should appear as ellipses, depending on where they're pointing. If you can identify the long axis and short axis of each ellipse, you can determine what angle the eye is looking at. Doing this with both eyes you may be able to triangulate and determine a position. My feeling is that most images will not have good enough resolution to do this very accurately, but it's something to try.

I expect it's probably worthwhile to spend some time studying literature on similar existing systems. I've never studied this myself; I'm just giving a few random thoughts as they come to me.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can someone plzzzz upload the code of tracking face and eyes with webcame in java.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

kiran k verma wrote:can someone plzzzz upload the code of tracking face and eyes with webcame in java.



Two things:
  • CodeRanch is NotACodeMill (⇐ that's a link, click it).
  • Please use real words when posting to the forums. Abbreviations such as "plzzzzzz" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses. Please click this link ⇒ UseRealWords for more information.
  •  
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic