se210 / WiimotePositionTrackingDemo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A demo of how to do simple 6DOF position tracking using a wiimote. Requires 4 IR LEDs as tracking markers. Blog has details on how to make one.

Uses wiiuse for connecting to the wiimote and getting raw IR values. Uses OpenCV's solvepnp for solving for camera pose. Drawing was based off of wiiuse's example which requires SDL 1.2 and OpenGL.

Build and run:

git submodule init
git submodule update
mkdir build
cd build
cmake ..
make
./demo

Press the sync button on the back of a wiimote to connect while it is searching for devices.

Controls:

A - switch between world frame and camera frame
B - draw the current path
Home - clear the drawn path
UP/DOWN - change the rendered camera size
LEFT/RIGHT - rotate the mapping of the leds (press this if your world y-axis is not pointing up or your camera y-axis is not pointing down)
PLUS/MINUS - change IR sensitivity
ONE - toggle whether to draw the wiimote
TWO - use the last few frames to print out a calibrated camera matrix

About


Languages

Language:C++ 96.4%Language:CMake 2.9%Language:Batchfile 0.7%