Loading...
Works

CV Rock-Paper-Scissors Computer Vision AI

banner
  • SkillsOpenCV, CV2, mediapipe
  • CodeGitHub Link
  • ProgressCompleted

This project was my first foray into computer vision. It is a simple rock-paper-scissors game that uses your webcame to detect your hand gestures. The recognition relies on the gestures being made vertically, with the palm facing the camera. The script detects raised fingers to determine the player's choice, i.e. a peace sign for scissors. The computer's choice is randomly generated.

The game can be started by launching the script and clicking "s", at which point a countdown begins and the player must make their gesture before it ends. There is also a "cheat mode" that can be activated by pressing "d" in which the computer waits an imperceptible amount of time to always pick the winning move.


This website is based on Takuya Matsuyama's website.