aspose file tools*
The moose likes Java in General and the fly likes Mapping eye movements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Mapping eye movements" Watch "Mapping eye movements" New topic
Author

Mapping eye movements

Nacho Hmar
Greenhorn

Joined: Oct 01, 2007
Posts: 5
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.


Knowledge belongs to the world!
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

The Java class that can move the mouse pointer around is "java.awt.Robot".


[Jess in Action][AskingGoodQuestions]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
[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.


"I'm not back." - Bill Harding, Twister
kiran k verma
Greenhorn

Joined: Jan 18, 2012
Posts: 2
can someone plzzzz upload the code of tracking face and eyes with webcame in java.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60049
    
  65

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.


  • [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Mapping eye movements
     
    Similar Threads
    Mouse Motion Listener
    Some sort of cursor label
    Mouse look
    Movable JPanel - How?
    how to see mouse movements of one machine