report.tex 8.8 KB

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