Skip to main content

An augmentative tool to use the mouse with the movement of the head.

Project description

Headmouse

The HeadMouse module provides an interface by opening the web camera anddetecting the user's face to control the mouse by tilting the head, using the tip of the nose as reference point. It can also be customized to trigger different functions instead of a mouse click when the user winks. To use the module it's necessary to have the file shape_predictor_68_face_landmarks.dat.

Compressed: http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2

Uncompressed: https://github.com/rfontalva/dlib_shape_predictor_68_face_landmarks/tree/master'

This project is part of a larger one called "Tecnoapoyos y Sociedad", which aims to level the opportunities of access to technologies for those who are impaired by some kind of disability, motor or neurological.

An opensource project developed in UTN-FRBA by Ramiro Fontalva.

Run demo

from Headmouse import HeadMouse
import cv2

if __name__ == "__main__":
    predictor_path = "/path/to/shape_predictor_68_face_landmarks.dat"
    h = HeadMouse(predictor_path=predictor_path)
    h.update_threshold(10, 5)
    while True:
        h.refresh()
        h.show_image()
        key = cv2.waitKey(1)
        if key == 27: #press escape
            h.destroy_window()
            h.quit()
            break
        if key == 32: #press spacebar
            h.calibrate()
            print("calibrated")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Headmouse-1.0.1.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file Headmouse-1.0.1.tar.gz.

File metadata

  • Download URL: Headmouse-1.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for Headmouse-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6a546bdbcc6b8f993ab6161f74bd9df0d9a6cb54fa1b5f6c865f00041f321119
MD5 c0e44e37884769a41c90c18d10e11945
BLAKE2b-256 b297b6fc2efa8d98e7add86c44dac8436e38e30e2fec6350ae6b6e76a8cb34f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page