Hidden Markov Models Implementation for Tangible Interfaces Piero Zappi 1 , Elisabetta Farella 1 , and Luca Benini 1 DEIS University of Bologna, Bologna, Italy {piero.zappi,elisabetta.farella,luca.benini}@unibo.it Abstract. Smart objects equipped with inertial sensors can recognize gestures and act as tangible interfaces to interact with smart environ- ments. Hidden Markov Models (HMM) are a powerful tool for gesture recognition. Gesture recognition with HMM is performed using the for- ward algorithm. In this paper we evaluate the fixed point implementation of the forward algorithm for HMM to assess if this implementation can be effective on resource constraint devices such as the Smart Micrel Cube (SMCube). The SMCube is a tangible interfacet that embeds an 8-bit mi- crocontroller running at 7.372 MHz. The complexity-performance trade off has been explored, and a discussion on the critical steps of the algo- rithm implementation is presented. Keywords: Smart Object, Hidden Markov Models, Tangible interfaces, Fixed point. 1 Introduction The development of smart objects is an active field of research. With the ob- jective of enhancing the interaction with smart environments, smart objects can be used as tangible interfaces and play a fundamental role in improving human experience within interactive spaces for entertainment and education [1]. The SMCube is a tangible interface developed for the TANGerINE framework, a tangible tabletop environment where users manipulate smart objects in order to perform actions on the contents of a digital media table [2]. Previous work showed how a simple ad-hoc technique and a standard tree classification algo- rithm can be implemented on the SMCube to include basic gesture recognition and improve interaction modalities [3]. Hidden Markov Models (HMMs) allow to handle temporal dynamics and clas- sify more complex gestures than the ones already recognized. Typically, classi- fication with HMMs is performed using a recursive algorithm called forward algorithm. Although this process is a lightweight task, several issues must be considered in order to implement it on a low-power, low-cost microcontroller such as the one embedded on the SMCube. In this paper we evaluate the fixed point implementation of the forward algo- rithm. Discussion of ad-hoc solution to solve numerical problems while keeping low overall computational complexity is presented. Considerations about the A. Nijholt, D. Reidsma, and H. Hondorp (Eds.): INTETAIN 2009, LNICST 9, pp. 258–263, 2009. c ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering 2009