yzucs313s951533′s Blog

HCI Final Project: Headtracking Game

Posted in Uncategorized by yzucs313s951533 on June 28, 2009

第三人視角:

第一人視角:

使用工具:

Library: Python, PyGame, PyOpenGL, OpenCV, Mac OSX API

Hardware: Webcam, IR LED, 帽子, IR Filter(用玻璃紙做的)

實作方法:

將IR LED裝置再帽子的帽簷,並使用OpenCV來判斷人頭的位置。webcam前加上玻璃紙,只讓紅外線通過,達到紅外線攝影機的效果。使用物理的方式來使webcam接收到的影像單純化,可增加效率。

遊戲的界面部份使用一個OpenGL的飛行小遊戲。

進行遊戲時,不需要使用雙手。使用者只需將頭上下左右移動,便可控制飛機的飛行方向與速度。向上的同時為減速,向下為加速。

配合離心力的概念,當使用者往右傾斜時,飛機會向左轉向。

請見實際遊戲操作影片。

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.