it might be better to track 3 circles of different colour set in the corners of a triangle on the screen. rotation and translation could then be tracked with the accelerometers used only for stability. Your rotation would be limited since the screen has to be visible to the webcam but it should be good enough.
onedotzero application uses the opensoundcontrol library
$ onedotzero-run.sh sudo: /usr/bin/liqbase-playground-cpu-performance: command not found ./onedotzero: error while loading shared libraries: liblo.so.0: cannot open shared object file: No such file or directory sudo: /usr/bin/liqbase-playground-cpu-ondemand: command not found