report.tex 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. \documentclass[twoside,openright]{uva-bachelor-thesis}
  2. \usepackage[english]{babel}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{hyperref,graphicx,float}
  5. % Link colors
  6. \hypersetup{colorlinks=true,linkcolor=black,urlcolor=blue,citecolor=DarkGreen}
  7. % Title Page
  8. \title{Universal multi-touch event mechanism}
  9. \author{Taddeüs Kroes}
  10. \supervisors{Dr. Robert G. Belleman (UvA)}
  11. \signedby{Dr. Robert G. Belleman (UvA)}
  12. \begin{document}
  13. % Title page
  14. \maketitle
  15. \begin{abstract}
  16. % TODO
  17. \end{abstract}
  18. % Set paragraph indentation
  19. \parindent 0pt
  20. \parskip 1.5ex plus 0.5ex minus 0.2ex
  21. % Table of contant on separate page
  22. \tableofcontents
  23. \chapter{Introduction}
  24. % Ruwe probleemstelling
  25. Multi-touch interaction is becoming increasingly common, mostly due to the wide
  26. use of touch screens in phones and tablets. When programming applications using
  27. this method of interaction, the programmer needs an abstraction of the raw data
  28. provided by the touch driver of the device. This abstraction exists in several
  29. multi-touch application frameworks like Nokia's
  30. Qt\footnote{\url{http://qt.nokia.com/}}. However, applications that do not use
  31. these frameworks have no access to their multi-touch events.
  32. % Aanleiding
  33. This problem was observed during an attempt to create a multi-touch
  34. ``interactor'' class for the Visualization Toolkit (VTK \cite{VTK}). Because
  35. VTK provides the application framework here, it is undesirable to use an entire
  36. framework like Qt simultaneously only for its multi-touch support.
  37. % Ruw doel
  38. The goal of this project is to define a universal multi-touch event triggering
  39. mechanism. To test the definition, a reference implementation is written in
  40. Python.
  41. % Setting
  42. To test multi-touch interaction properly, a multi-touch device is required.
  43. The University of Amsterdam (UvA) has provided access to a multi-touch table
  44. from PQlabs. The table uses the TUIO protocol \cite{TUIO} to communicate touch
  45. events.
  46. % Afbakening
  47. % TODO: moet dit omlaag naar 'Definition of the problem'?
  48. The scope of this thesis includes the design of an multi-touch triggering
  49. mechanism, a reference implementation of this design, and its integration into
  50. a VTK interactor. To be successful, the design should allow for extensions to
  51. be added to any implementation. The reference implementation is a Proof of
  52. Concept that translates TUIO events to some simple touch gestures that are used
  53. by a VTK interactor.
  54. \section{Structure of this document}
  55. % TODO
  56. \chapter{Definition of the problem}
  57. % Hoofdvraag
  58. The goal of this thesis is to create a multi-touch event triggering mechanism
  59. for use in a VTK interactor. The design of the mechanism must be universal.
  60. % Deelvragen
  61. To design such a mechanism properly, the following questions are relevant:
  62. \begin{itemize}
  63. \item What is the input of the mechanism? Different touch drivers have
  64. different API's. To be able to support different drivers (which is
  65. highly desirable), there should probably be a translation from the
  66. driver API to a fixed input format.
  67. \item How can extendability be accomplished? The set of supported events
  68. should not be limited to a single implementation, but an application
  69. should be able to define its own custom events.
  70. \item Can events be shared with multiple processes at the same time? For
  71. example, a network implementation could run as a service instead of
  72. within a single application, triggering events in any application that
  73. needs them.
  74. \item Is performance an issue? For example, an event loop with rotation
  75. detection could swallow up more processing resources than desired.
  76. \end{itemize}
  77. \chapter{Preliminary inquiries}
  78. \section{The TUIO protocol}
  79. The TUIO protocol \cite{TUIO} defines a way to geometrically describe
  80. tangible objects, such as fingers or fiducials on a multi-touch table. The
  81. table used for this thesis uses the protocol in its driver. Object
  82. information is sent to the TUIO UDP port (3333 by default).
  83. For efficiency reasons, the TUIO protocol is encoded using the Open Sound
  84. Control (OSC)\footnote{\url{http://opensoundcontrol.org/specification}}
  85. format. An OSC server/client implementation is available for Python:
  86. pyOSC\footnote{\url{https://trac.v2.nl/wiki/pyOSC}}.
  87. A Python implementation of the TUIO protocol also exists:
  88. pyTUIO\footnote{\url{http://code.google.com/p/pytuio/}}. However, the
  89. execution of an example script yields an error regarding Python's built-in
  90. \texttt{socket} library. Therefore, the reference implementation uses the
  91. pyOSC package to receive TUIO messages.
  92. The two most important message types of the protocol are ALIVE and SET
  93. messages. An ALIVE message contains the list of session id's that are
  94. currently ``active'', which in the case of multi-touch a table means that
  95. they are touching the screen. A SET message provides geometric information
  96. of a session id, such as position, velocity and acceleration.
  97. Each session id represents an object. The only type of objects on the
  98. multi-touch table are what the TUIO protocol calls ``2DCur'', which is a
  99. (x, y) position on the screen.
  100. ALIVE messages can be used to determine when an object touches and releases
  101. the screen. For example, if a session id was in the previous message but
  102. not in the current, The object it represents has been lifted from the
  103. screen.
  104. SET provide information about movement. In the case of simple (x, y)
  105. positions, only the movement vector of the position itself can be
  106. calculated. For more complex objects such as fiducials, arguments like
  107. rotational position is also included.
  108. TUIO coordinates range from $0.0$ to $1.0$, with $(0.0, 0.0)$ being the
  109. left top corner of the screen and $(1.0, 1.0)$ the right bottom corner. To
  110. focus events within a window, a translation to window coordinates is
  111. required in the client application, as stated by the online specification
  112. \cite{TUIO_specification}:
  113. \begin{quote}
  114. In order to compute the X and Y coordinates for the 2D profiles a TUIO
  115. tracker implementation needs to divide these values by the actual
  116. sensor dimension, while a TUIO client implementation consequently can
  117. scale these values back to the actual screen dimension.
  118. \end{quote}
  119. % TODO
  120. \chapter{Experiments}
  121. % testimplementatie met taps, rotatie en pinch. Hieruit bleek:
  122. % - dat er verschillende manieren zijn om bijv. "rotatie" te
  123. % detecteren, (en dat daartussen onderscheid moet kunnen worden
  124. % gemaakt)
  125. % - dat detectie van verschillende soorten gestures moet kunnen
  126. % worden gescheiden, anders wordt het een chaos.
  127. % - Er zijn een aantal keuzes gemaakt bij het ontwerpen van de gestures,
  128. % bijv dat rotatie ALLE vingers gebruikt voor het centroid. Het is
  129. % wellicht in een ander programma nodig om maar 1 hand te gebruiken, en
  130. % dus punten dicht bij elkaar te kiezen (oplossing: windows).
  131. % Tekenprogramma dat huidige points + centroid tekent en waarmee
  132. % transformatie kan worden getest Link naar appendix "supported events"
  133. % Proof of Concept: VTK interactor
  134. % -------
  135. % Results
  136. % -------
  137. \chapter{Server structure}
  138. % TODO: link naar appendix met schema
  139. \section{Input server}
  140. % TODO
  141. % vertaling driver naar point down, move, up
  142. % TUIO in reference implementation
  143. \section{Gesture server}
  144. \subsection{Windows}
  145. % TODO
  146. % toewijzen even aan deel v/h scherm:
  147. % TUIO coördinaten zijn over het hele scherm en van 0.0 tot 1.0, dus moeten
  148. % worden vertaald naar pixelcoördinaten binnen een ``window''
  149. \subsection{Trackers}
  150. % TODO
  151. % event binding/triggering
  152. % extendability
  153. \chapter{Reference implementation}
  154. % TODO
  155. % draw.py
  156. % VTK interactor
  157. \chapter{Conclusions}
  158. % TODO
  159. % Windows zijn een manier om globale events toe te wijzen aan vensters
  160. % Trackers zijn een effectieve manier om gebaren te detecteren
  161. % Trackers zijn uitbreidbaar door object-orientatie
  162. \chapter{Suggestions for future work}
  163. % TODO: Network protocol (ZeroMQ)
  164. \bibliography{report}{}
  165. \bibliographystyle{plain}
  166. \appendix
  167. \chapter{Schema of mechanism structure}
  168. \label{app:schema}
  169. % TODO: "dia"
  170. \chapter{Supported events in reference implementation}
  171. \label{app:supported-events}
  172. % TODO
  173. \end{document}