本論文設計一個電腦與真人猜拳的遊戲,設定遊戲一開始時,播放一段音樂,當音樂在某個時間停止時,真人與電腦隨機產生之隨機拳數同步出拳,電腦並立即辨識真人手勢以判定輸贏,再把輸贏結果,顯示於電腦介面上。 在此遊戲中,手勢辨識是最重要的工作,我們利用一台攝影機及影像處理的方法去設計出一套辨識系統。首先,要把手部從複雜的背景之中分離出來,此工作中含有背景相減及膚色擷取兩個步驟。 接下去我們用侵蝕與擴張去除雜訊及補足缺口,然後再轉變成二值化手勢影像。接下來我們求出手部的重心為圓心,以適當半徑掃描手部,記錄了所有手部輪廓點的座標及每個輪廓點到手部重心的距離,根據角度與距離的關係以辨識手指數。本論文演算法在任何方向出現及含有手臂跟不含手臂的手勢皆能辨識成功。
This thesis designs a finger-guessing game system which is the game playing between human and computer. There is a music playing with the game; once the music stops, the human and computer show the hand gesture at the same time. The computer can recognize the human’s gesture and then decide who is the winner? The gesture display of the computer is presented randomly and the result of the game will be shown in the computer interface. In the game, the hand gesture recognition is the key part of the system. This system needs a computer and a CCD. First, we separate the hand from the complex background, where the processes of background subtraction and skin color extraction are applied. Next, we use dilation and erosion techniques to delete the noise and compensate the breach. Then let the image be transformed to a binary image. On the binary image, we find the gravity of the hand gesture to be the center of scanning circle. Based on the scanning result, the distance and the angle between the contour and the center can be utilized to recognize the fingers’ number. The proposed algorithm is feasible to recognize the hand gesture with arm or without arm and is workable no matter the hand is shown from any direction.