Skip to content

A Python script that transforms facial movements into game controls using OpenCV and PyAutoGUI, creating a hands-free gaming experience.

Notifications You must be signed in to change notification settings

Brandi-Kinard/opencv-face-game-controller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

OpenCV Face Game Controller

A Python script that transforms facial movements into game controls using OpenCV and PyAutoGUI, creating a hands-free gaming experience.

Overview

Welcome to the OpenCV Face Game Controller repository! This project demonstrates an innovative application of computer vision technology by integrating OpenCV's dynamic face detection capabilities with PyAutoGUI to control video games using facial movements. By simply tilting your head, you can send commands to your favorite games, offering a novel, hands-free gaming experience.

undefined-high (12) undefined-high (13) undefined-high (14)
Watch full video on vimeo

Why This Project Is Useful

In an era where accessibility in technology is more crucial than ever, the ability to control games without physical controllers opens doors for users with mobility restrictions and offers a fun, unique way to interact with technology for everyone. This project not only highlights the flexibility of AI and computer vision technologies but also pushes the boundaries of traditional gaming interfaces.

How It Works

  1. Face Detection: The application uses OpenCV to detect the user's face in real-time through a webcam feed.
  2. Motion Interpretation: Specific movements of the face (like turning or tilting) are captured and interpreted as game controls.
  3. Game Interaction: These movements are then translated into keyboard inputs via PyAutoGUI, allowing the user to control game actions directly through facial gestures.

Prerequisites

Ensure you have the following installed:

  • Python 3.6+
  • OpenCV (opencv-python)
  • PyAutoGUI
  • Numpy

Getting Started

To get this project up and running on your local machine:

  1. Clone the Repository:
    git clone https://github.com/<Brandi-Kinard>/opencv-face-game-control.git
  2. Install Requirements:
    pip install opencv-python pyautogui numpy
  3. Run the Notebook: Navigate to the cloned directory and launch a code editor (e.g. PyCharm CE) to see the project in action.

For the Future

If you want to add more, Please don't hesitate to open a pull request.

👋 Get in Touch

text

About

A Python script that transforms facial movements into game controls using OpenCV and PyAutoGUI, creating a hands-free gaming experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages