msgbartop
Random programming ramblings
msgbarbottom

27 Sep 08 Camera Mouse

Using just a simple webcam it is possible to track your eyes and head movement in such a way that you can actually control the computer mouse.  You can also simulate mouse clicks just by blinking (a left blink would be a left-click, right blink naturally is a right-click)

This might be very useful for example for people with disabilities who can not use a regular mouse (and where the normal solutions tend to very expensive since they require specialized hardware such as infrared tracking cameras, whereas only a plain webcam is neccassary here)

The whole system is written in Python, using the Intel OpenCV library and SciPy.

Source Code:

Once I get the time to remove some code specific to my machine I’l make it available here for anyone who wants to try out the system. The code is currently only available for windows only, but it should be easy to port to other systems.  (The only platform specific code is the part to simulate the mouse clicks)

You will also need the following:

  • The Intel OpenCV library
  • Python (naturally)
  • libsvm
  • A computer with a webcam

The syste

Tags:



Reader's Comments

  1. |

    hi,

    i’m disable because of ALS (lou gerihg desease)
    i’m realy interrested in your project
    will it be available fr linux? when?
    very
    very Great project

    Kilhian

  2. |

    It is currently windows only, but should not be to difficult to port to linux. (I am planning on packaging the system for linux and as an executable for windows, but that will only be after a month or two)

  3. |

    Back again :)

    When should I be able to try it ?

    Kilhian

  4. |

    Hi,
    Could I know how do you smooth the mouse movements?
    I have problems with that.

    TIA
    Regards,
    Marcelo.

  5. |

    Thanks for good post

  6. |

    I have a similar comment to Marcelo… the mouse movements in the demo seem pretty smooth. When I tried a similar program (from CameraMouse.com, which also appears to be based on OpenCV), the mouse cursor was too fidgety to be useful. Perhaps I didn’t play with the options enough…

  7. |

    I work with students with disabilities throughout the state of Oklahoma and am always interested in free programs to help them with accessing the computer. I am very interested in your program (especially the eye blink piece) and would love to know when available.

    Thank you!
    Crouch

  8. |

    I will work on the software and hopefully I can have an installable version by the end of the month (or early next month), I will make it available from this blog.

    Marcelo + Quinn - Smoothing the mouse movements is actually a harder problem than it seems. I track whichever eye is open and use the average position of the last few frames (plus filter out any sudden movements) Then there is also an ‘acceleration’ applied for small movements (almost like the option available for a normal mouse), but that will be much clearer when you can actually download it.

  9. |

    is there a realease available to download?

  10. |

    you should take a look at this:
    http://sourceforge.net/projects/erutarian



Leave a Comment