Motion tracking using Matlab, a Nintendo Wii Remote, and infrared LEDs.



Similar documents
Lab 2 Sensor Modeling Introduction to the Wiimote and the Wiimote LABVIEW Interface

Beginner s Matlab Tutorial

BTH360-S Bluetooth Stereo Headset Specifications & User's Guide

RME Driver Install and Update Guide for Windows XP

iloq P10S.10/20 Programming device User's Guide

How To Control Gimbal

Mirror Mount Video Monitor/Recorder with Front and Rear View Night Cameras PLCMDVR5

Virtual CRASH 3.0 Staging a Car Crash

Table of Contents. Use. Troubleshooting. Setup. Welcome. 11 How to arm/disarm system/camera(s) 19 Sync Module setup issues. 3 Installing the Blink app

IR-PRO IR-PRO. Operation Guide. Professional Infrared Code Capture System

How To Use A Magistrate Desktop Computer

Watch Your Garden Grow

PS 29M DUAL CHANNEL BELTPACK IN METAL CASE

Advanced Programming with LEGO NXT MindStorms

Lab 3: Introduction to Data Acquisition Cards

Bathroom Cabinet. Installation & User Guide. Illuminated Mirrors.

Video in Logger Pro. There are many ways to create and use video clips and still images in Logger Pro.

HP Bluetooth Pendant Headphones User Guide

2 Vehicle CCTV System with Mini Internal, Mini IR Vehicle Cameras and 4 Camera Recorder with GPS and SD Card Recording (Model: SVC412PS)

Alarm Security Kit - NVR

INSTRUCTION MANUAL All-In-One GSM Home Alarm System SB-SP7200-GSM

MXL 990 Virtual Preamp Installation

Renewable Energy Monitor User Manual And Software Reference Guide. (979)

Tutorial for Tracker and Supporting Software By David Chandler

Page 1 S5.5 Monitoring Software Manual Rev 1.2 for Software Ver 1.0

TekBots TM Oregon State University. usb_cam User Guide. Version 1.0 By Adriaan Smit OSU EE Graduate Student

Audio Only Broadcast through Flash Media Live Encoder On Windows

This Document Contains:

TS1 Ultra Sonic Tank Sender Training. 27 November 2007

Contents Contents Contents Overview Charging your headset Wearing the headset Powering on the headset Connecting your headset for dictation

BIG BLUE BUTTON TRAINING

DAKTON µ BOX MANUAL µbox User Manual 1

User Manual.

Nighthawk AC1900 WiF Range Extender

5. Tutorial. Starting FlashCut CNC

Firmware & Software update procedures Amicroe TouchTAB IV.

CinePlay User Manual

How to setup a serial Bluetooth adapter Master Guide

User Guide. Introduction to 3M Digital Designs. User Guide Contents: Installing 3M Digital Designs Software. Setting up a Plotter

STEREO BLUETOOTH WIRELESS HEADPHONES

SMART CONSOLE Software and Firmware Upgrade Procedure

Product Description Product structure

2.0 AUDIO RECORDING INTERFACE

OVERVIEW Playbacks: Shortcuts: Memories: Data Entry Wheels: Touchpad: Master and Blackout:

Digital Photo Bank / Portable HDD Pan Ocean E350 User Manual

Cassette2CD Wizard User's Manual

F-Series Desktop User Manual F20. English - Europe/New Zealand

Procedure for updating Firmware of EZ4 W or ICC50 W

USING THE RECORDING KIT By Version: 23 January 2015

LDG DTS-4/4R Desktop Coaxial Switch / Remote

Bluetooth Installation

FMT600BT Transmitter

User Guide. Soft-Touch TM Bluetooth Laser Mouse N2953

User Guide. VT1708A VIA HD Audio Adeck For Windows 2000, Windows XP & Server Jun Revision 1.1e

Lenovo Miix 2 8. User Guide. Read the safety notices and important tips in the included manuals before using your computer.

SCDSB Video Conferencing

USB Port Extender Kit

BLU Vivo 4.3 User Manual

Dension BTA1500 Bluetooth Module

Basics. How can I use the Internet to make free calls?

TOSR0X-D. USB/Wireless Timer Relay Module. User Manual. Tinysine 2013 Version 1.0

MJPEG Camera Client User Manual

Device Diagram Compatible with: Charging your wristband

Flight Controller. Mini Fun Fly

igadgitz Bluetooth Audio Transmitter & Receiver (BTT009 / U3442) User Guide

Kiva Technology User s Manual

COBRA 18R2 Wired Reprogramming Instructions

For assistance, contact CASL Tech : casltech@ucd.ie. Usage Requirements 1. System capabilities 5 Instructions for Use.. 6

Gotcha! Catch every moment. Find thousands more great ideas online

Installing/Uninstalling Logitech desktop for Bluetooth on my computer

Breathe. Relax. Here Are the Most Commonly Asked Questions and Concerns About Setting Up and Programming the SurroundBar 3000.

Getting Started: Creating the Backdrop

Mbox Basics Guide. Version 6.7 for LE Systems on Windows XP or Mac OS X. Digidesign

How can I use the internet to make free calls?

Welcome to the Adobe Connect Basic Troubleshooting Techniques training class.

Digital Video Recorder

The main imovie window is divided into six major parts.

Tutorials Drawing a 555 timer circuit

DCT-16 USB HD Audio Converter

User Manual. NETGEAR, Inc. 350 East Plumeria Drive San Jose, CA 95134, USA. December

Determining Your MAC Address in Windows XP

ImagineWorldClient Client Management Software. User s Manual. (Revision-2)

Introduction Configuring Your HP Mouse Batteries Replacing the Batteries Mouse Sensor Technology Navigating the HP Mouse Control Center

Quick Installation Guide

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

Call Recorder Oygo Manual. Version

Video Baby Monitor System. User Guide

HDCVI Series DVR Quick Start Guide

Scripting Language Reference. SimpleBGC 32bit

What s in the Box? Welcome. The GymAware Kit. Congratulations on your purchase of a GymAware PowerTool POWERTOOL CHARGER.

ezsystem elab16m Project 1F: Alarm System (Full Project description)

RC8061 Pan and Tilt Camera Installation Guide

Lenovo IdeaPad Yoga11

Wireless Joey High/Standard Definition Uses Wireless Joey Access Point. Receivers Wireless Joey

DSB-100 Portable Premium Bluetooth Speaker Owner s Manual

BlueGate. Your easy to use reference for getting the most out of your product USER GUIDE. Enjoy FREE REGISTRATION

Xbox LIVE Vision. english

Transcription:

Motion tracking using Matlab, a Nintendo Wii Remote, and infrared LEDs. Dr W. Owen Brimijoin MRC Institute of Hearing Research (Scottish Section) Glasgow Royal Infirmary 16 Alexandra Parade Glasgow G31 2ER United Kingdom owen@ihr.gla.ac.uk Introduction This document describes how to use a Wii remote to do simple single-axis motion tracking. The Wii remote is an inexpensive peripheral for a video game system built by Nintendo. It has buttons, a 3-axis accelerometer, and an infrared camera mounted on the front. The Wii remote is a useful tool for researchers: the buttons on the device can be used for recording subject responses, the accelerometers can be used for detecting movement, and the camera can be used to do reasonably accurate motion-tracking of objects such as the head. Combined with Matlab and digital signal processing, it is possible to use this system to (e.g.) adjust signals presented over headphones in real-time so that they appear to remain fixed in space, rather than moving with the head. Note: this code does not do stereoscopic 3D tracking: it can only measure rotations that are in the plane of the camera. This will allow you to track yaw, rotations of the head in the vertical axis (shaking your head no ), but not pitch or roll. If you find this code useful for your science, please cite Brimijoin et al (in press 2013, PLoS One). Requirements 1) 1 or more Nintendo Wii remotes 2) 1 Microphone stand with clip or other mounting hardware for the remote 3) 1 Bluetooth Chip and associated software driver stack 4) 1 array of infrared LEDs (battery powered) 5) 1 copy of Matlab 6) 1 copy of the WiiLAB dynamic link library 7) 7 Matlab files (included here) Detailed Requirements 1) Wii remotes. The most recent iteration of the Nintendo Wii remote has been known to have compatibility problems. We recommend either an original (pre-2010) Wii remote (the ones without the words Motion-Plus printed on the remote), or a first generation Motion-Plus remote. 2) Stand for wii remote. The wii remote should be mounted above the head, pointing down at the participant (see figure 1). Microphone stands can

2 be used for this purpose, provided they have a clip style microphone mount with jaws large enough to fit around the body of the remote. Given the limited field of view of the Wii remote s infrared camera, it is recommended that the remote be mounted at least a meter above the head. The height you use will be a tradeoff between tracking accuracy (closer is better), and the area over which you can capture motion (farther is better). Given the size of the infrared LED array you are using (see point 4 below) and typical subject movements, an ideal distance that allows accurate tracking but little loss of the subject s head is about 5 times as far away as the length of the LED array. 3) Bluetooth chip. It is recommended that you use a third-party Bluetooth USB dongle such as those made by Belkin (F8T065) and install the Bluetooth drivers either from the included compact disc or downloaded from the manufacturer. The reasons for this are that the built-in Windows Bluetooth chips and stack have been known to raise compatibility issues. 4) Infrared LED array. (Figure 2). The array must be of 3 infrared LEDs arranged in a single row. The exact dimensions of the array are not critical (the one we use is 0.2 meters in length) but the important thing is that the rear two LEDs must be closer together than they are from the front LED. The reason for this is that this asymmetry allows Matlab to determine the front and back of the array, so making it possible to record 360 of motion. A circuit diagram of a simple version of a suitable LED array is shown in Figure 2. The array can be built by anyone with any soldering experience this example is powered by a single 9 volt battery, has a single on-off switch, one 47 Ohm resistor, and three 1.5 volt infrared LEDs wired in series. The LEDs, resister, battery, and switch can be mounted on anything, provided that this object can in turn be mounted on the head. We recommend using the inside of a construction hard hat, as the adjustable plastic bands inside a hard hat can be made to fit any head and are easily disinfected. 5) A licensed copy of Matlab (r13 or later). 6) WiiLAB library. You will need to download and install the WiiLAB library from Brindza and Szweda at Notre Dame. The installer can also be obtained from its original source here: http://netscale.cse.nd.edu/twiki/bin/view/edu/wiimote Download the.zip file containing the installer and source code (currently this link is called Get the zip file (full install). ). Unzip the directory to a spot on the matlab path. Run the installer batch file: InstallWiiLab. The resulting directories will contain a number of files, the critical ones being WiiLAB.dll, WiimoteLib.dll, and WiiLAB.tbl. Either copy these and place them into

3 a directory with the matlab functions listed below, or move the Matlab functions to the directory containing them. Compatibility note: For older versions of Matlab (or for instances where installation or connection from Matlab proves to be a problem), an alternative version of the WiiLAB library has been provided by Ian Stevenson and may be found here: http://klab.wikidot.com/wii-proj. Select the link: WiiLab_2007aCompat.zip 7) Matlab functions. The functions included in the zip file are detailed below: Core functions: connect_n_wiimotes(n); %this connects n wiimotes (one for tracking, one for response, etc). disconnect_ wiimotes(); %this disconnects all connected wii remotes. buttons = get_wiimote_buttons(remote_num) %tell it which remote you want and it will return what button(s) are being pressed. accel = get_wiimote_acceleration(remote_num) %tell it which remote you want and it will return the output of the 3 accelerometers [yaw, x, y] = get_wiimote_angle(remote_num) %tell it which remote you want and it will return the angle and xy position of the infrared LED array. Example Functions: test_wiimote(remote_num) %this simply plots all data that is received from the wiimote (buttons, acceleration, LED locations, and angle). It calls the other functions to demonstrate how they are used. [yaws, xvals, yvals] = record_head_angle(duration,remote_num) %this is another example function showing how to use get_wiimote_angle.m to record head motion over a specified time. Motion Tracking Methods: 1) Pairing the Wii Remote to Windows: The Wii remote must first be connected to the computer*. This is accomplished through the Show Bluetooth devices dialog box (typically found in the tray at the bottom right of the screen). Click Add a device then immediately press down buttons (1) and (2) on the wii remote. The LEDs on the remote will begin flashing and the remote will now show up in the list of devices (as something like Nintendo RVL-CNT-01 ). Select this, click next, and then Pair without using a code. These mouse clicks must be performed within about

4 ten seconds or else the wii remote will stop flashing and the pairing will fail. If it works, a dialogue box should now read This device has been successfully added to this computer. The blue LEDs on the wii remote will continue to blink. Click dialogbox at this point. Once you are finished motion tracking, it is recommended that you remove the device (by right clicking and selecting remove device ). *Note that these instructions are based on pairing the device in Windows 7. 2) Connecting to the Wii remote in Matlab: To connect a single Wii remote, open matlab and type the following at the Matlab command line: >> connect_n_wiimotes(1) If the connection is successful, the blue LEDs on the Wii remote will now stop flashing and a single one will light steadily. If this does not happen, remove the device from Windows Bluetooth devices and start again at step 1). To test whether you have a good connection, run test_wiimote(1). The active buttons and the output of the accelerometers should be displayed in the figure window. Once you are finished motion tracking, it is recommended that you disconnect the device by typing >> disconnect_wiimotes at the Matlab command prompt and then remove the device from the Windows Bluetooth devices. Warning! If you shut off the wii remote, disconnnect it from Windows, remove the battery, or let it run down on charge all the way, this will cause Matlab to crash unceremoniously without saving your workspace. 3) Motion tracking: Turn on the LED array and ensure it is in the field of view of the wii remote. You can run >> test_wiimote(1) in Matlab to visualize the output of the wii remote camera. If the remote can see all three LEDs of the array, they will be displayed in real-time on the screen as red green and blue dots. The subtended angle of the array will also be displayed on the figure. The core functions detailed above can be used as components in any Matlab script or function. An example for how to record head movements over time and report them as a vector of head angles is given with the function: >> record_head_angle(duration,remote_num). This example function takes as its input duration (in seconds), and remote number. For example, to record 2 seconds of angle and array position, call the function as follows: >> [yaw,x,y] = record_head_angle(2,1); >> plot(yaw) Other possible uses for the motion tracking system would be to alter in real-time some aspect of a signal being presented, for example the ITD or ILD or to choose a binaural room impulse response. For these applications, one should call

5 >> yaw = get_wiimote_angle(1) ; in a loop to query the wii remote for head angle. You may then use this angle to adjust audio playback. We have successfully implemented this system using Windows XP with Matlab r13 and Windows 7 with Matlab versions 2011a and 2013b. We have not tested it on any other system, and we cannot guarantee that it will work on your system.