Recognize Rock, Scissors and Paper from video captured by the camera. Play rock-paper-scissors with your computer!
Course Project FOR SFU COMPUTER VISION
You do not need to build the project yourself if you only want to try it. Download the binary EXE from the following link:
The binary above assumes that the computer has at least one webcam, and the front webcam is the default one. If you want to change this setting, you need to modify function CGesture_RecognitionDlg::OnCreate
in file Gesture_Recognition/Gesture_RecognitionDlg.cpp
- Start the program. Make yourself in the video stream captured by the camera.
- Do not put your hand in the scene for now. Click the button 'Set Background' which will make the program take a snapshot of the current scene and it will be used for futural background removal.
- Put your hand in the scene, test if you can see your hand and if your gesture is detected.
- Start the game by clicking 'Start Game' button.
- Reset scoreboard by clicking 'Reset Score Board' button.
- If you see the program detects something in the background on the detection window, you might need to set background again.
- OpenCV 2.4.11
- MFC
- Microsoft Visual Studio 2013
- Download
OpenCV 2.4.11
from the link above, unzip all files toC:\opencv
(If you don't want to unzip files intoC:\opencv
, you need to edit/Gesture_Recognition/Gesture_Recognition.vcxproj
with some plain text editor) - Build the project with MS VS2013
- Set platform
WIN32(x86)
and useRelease
configuration - Please use OpenCV with version 2.4.11 exactly
- If you want to configure project dependency yourself, use
staticlib
Please refer to the file Gesture_Recognition/Gesture_Recognition.vcxproj
Haar-like features (algorithm implemented in OpenCV).
Use face color to build skin color model
Detect hand region and remove face
Remove background (noise)
This makes the shape of the hand.
Will be used to determine Fingertips
Convexity Defects is feature 1.
Number of fingertips is feature 2.
With feature 1 & 2
Use a queue to record history
Use MFC to implement the UI and randomize the gesture of the computer
- Hand tracking and gesture recognition system for human-computer interaction using low-cost hardware, Hui-Shyong Yeo & Byung-Gook Lee & Hyotaek Lim, Dongseo University, Multimedia Tools Application, May 2013
- Visual Processing of Rock, Scissors, Paper Game for Human Robot Interaction, Ho-sub Yoon & Su-Young Chi, Division of Intelligent Robot, SICE-ICASE International Joint Conference 2006
- Chai D, Ngan KN (1999) Face segmentation using skin-color map in videophone applications. IEEE Trans Circ Syst Video Technol 9(4):551-564
- Real-Time Palm Tracking and Hand Gesture Estimation Based on Fore-Arm Contour, Weishao Chen, National Taiwan University of Science and Technology, July 2011.
- Vision-Based Finger Action Recognition by Angle Detection and Contour Analysis, Daeho Lee & SeungGwan Lee, ETRI Journal, vol. 33, no. 3, June. 2011, pp. 415-422.
- Vision based gesture recognition system with single camera, Wei Du & Hua Li, CAD Lab, Institute of Computing Technology, Chinese Academy of Science, Signal Processing Proceedings, 2000. WCCC-ICSP 2000. 5th International Conference on Volume:2
GNU GPL 3.0
You must give appropriate credit (link to this repo) if you use (part of) this project IN YOUR WORK. Appropriate copyright info is also required by GNU GPL 3.0