Making a web application respond to Kinect sensor

This experiment has got three parts.
 1. Front end :
 This is the web part done with html5 and javascript libraries(Processing js the one I have used).
 2. Back end
 Processing(java flavour) installed with openni and OSC libraries to capture the hand movements and send them as OSC signals.
 3 .OSC-Web
 This is used as connector between the above two parts.
Setting up of OSC-Web
 pre requisities
Node JS installation
 Here we are installing node globally for all users. Execute following commands.
 cd  /usr/local/src
 sudo mkdir node
 cd node
 sudo wget
 sudo tar -xzvf node-v0.6.17.tar.gz
We now need to enter the extracted directory and configure the code.
 cd node-v0.6.17
 sudo ./configure
Normally it ends up successfully. Otherwise some missing libraries like g++, openssl-devel are to be installed.

Then execute the make commands.
 sudo make
 sudo make install
This will result in the commands node and npm been installed into the /usr/local/bin directory
Now check versions of node js and npm
 node -v
 npm -v
Refer for more details. installation

Install from using following command.
 npm install
 This will create a node_modules folder with a sub directory
OSC-Web installation

 git clone git://
 (Install git using apt-get install git if it is not installed.)
 This will create a osc-web folder.
Now move node_modules and osc-web folder to localhost(/var/www) with appropriate permission.
To start the server

cd osc-web
node bridge.js (server program that connects the program that emits osc signal and the web program that receives these signals )
Usually this gives node module missing errors. These missing node modules are to be installed into node_modules folder (/var/www @ the peer level of osc-web folder). These missing modules are version specific and may vary from version to version.

For that leave the current folder and cd to node_modules folder.
      cd node_modules.
      npm install <missing libraries>
      eg: npm install node-osc

Step 1

Now run the sever(bridge.js ) again.
   node bridge.js
Most probably it will be running successfully. 

Step 2

Now run the web application from local host, which should contain a file in it. The  example web program is given in  osc-web/web-side/app.html. In this , the ports that receives and emits the osc signal are specified explicitly and can be changed according to our needs. 
Step 3

Then run the processing program which sends the osc signal to the specified port.Now reload the browser and osc signals from the processing program can be displayed as an array in the console(if it is asked to do so). If the entire application behaves indifferently restart the server (node bridge.js).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s