Wednesday, January 30, 2013

OpenNI old version 1.x on Windows 8

PrimeSense released ther OpenNI 2.0 version without too much concern about their previous versions.

I am trying to figure out what they did with their older versions and how you can install the old version on Windows 8..

Here are the sources to the old OpenNI version
https://github.com/OpenNI

Here is the driver by avin:
https://github.com/avin2/SensorKinect 
some more driver versions:
https://github.com/avin2/SensorKinect/downloads

In this may 2012 forum post, avin adds this note: This version must be used with OpenNI 1.5.4.0! It will not work or compile with previous versions so please be sure to install it.
I'm also going to add support for Kinect4Windows as soon as I get my
hands on one (which will finally happen next week).

Finally I found this download that contains:
  openni-win64-1.5.4.0-dev
  nite-win64-1.5.2.21-dev
  sensor-win64-5.1.2.1-redist
  SensorKinect092-Bin-Win64-v5.1.2.1
maybe this works 

Monday, April 2, 2012

Sinbad Animations

Full Elbow Animation


Elbow Animation - Part 1


Elbow Animation - Part 2


Elbow Animation - Part 3

Tuesday, February 28, 2012

Paint

The Sample-NiUserTracker was extended in order to draw rectangles and circles on the screen. The right hand position was traced and the last 200 points are stored and redrawn every frame. When the 200 points limit is reached, half of them are cleared and the next 100 are drawn continuously. The number of points can be seen clearly in figure [Paint] (a).

To control the behavior of the program, the following shortcuts are used:

a switches between rectangles and circles

q/w increases/decreases the rectangles or circles size

s draws/clears skeleton

b draws background

p pauses

esc exits program
Painting with Kinect






Download Paint
  • binary file is included - runs on Ubuntu, needs OpenNI libraries
  • source is included

Perspective

In the following we would like to give the user “a feel” for the position of his hand in the 3D space in order to suggest him follow a certain hand path.

So we did the following

  • track hand by drawing circles - a circle is simpler and easier to notice than a rectangle (because it's continuous, doesn't have corners)
  • draw circle only if it is at a certain distance from the previous circle - this way the screen isn't filled when the user is not moving his hand
  • reduce the number of circles drawn - also in order not to fill the screen
  • circle size depends on the Z coordinate, the closer the hand is to the camera, the larger the circle

The problem is that the dimension of the circles comparing with when the hand is near the body opposite to when it is stretched out towards the camera, is not noticeable. So a dynamic circle dimension needed to be developed.

This was realised by changing the circle dimension with a fixed size and increasing/decreasing the current circle size depending on the increase or decrease of the Z coordinate.

Another method to give a sense of perspective would be to improve the human model (now represented only by lines) and vary the size of the body parts getting closer to the camera (increasing Z coordinate).

Thursday, February 9, 2012

OpenNI Install on Ubuntu

STEP 1 - Download the OpenNI modules appropriate for your operating system from http://www.openni.org/Downloads/OpenNIModules.aspx 

You should download these three:

• OpenNI binaries

• OpenNI compliant middleware binaries

• OpenNI compliant hardware binaries



The downloaded files should like these:

->OpenNI-Bin-Linux32-v1.1.0.41.tar.bz2

->Nite-1.3.1.5.tar.bz2

->Sensor-Bin-Linux32-v5.0.1.32.tar.bz2

STEP 2 - Update your linux

$ sudo apt-get update

Install these files which are necessary for proper installation of drivers

$ sudo apt-get install mono-complete

$ sudo apt-get install libusb-1.0-0-dev

$ sudo apt-get install freeglut3-dev

STEP 3 - The extracted folders in step 1 will be

->OpenNI-Bin-Linux32-v1.1.0.41

->Sensor-Bin-Linux32-v5.0.1.32

->Nite-1.3.1.5 rename it to OpenNI, Sensor, Nite respectively

STEP 4 - Go to the folder OpenNI, Sensor, Nite and run

$ cd OpenNI

$ sudo ./install.sh

$ cd ../Sensor

$ sudo ./install.sh

$ cd ../Nite

$ sudo ./install.sh

STEP 5 - Prepare to download the sources:

(1) mkdir ~/kinect && cd ~/kinect

(2) git clone https://github.com/OpenNI/OpenNI.git

(3) cd OpenNI/Platform/Linux/Build

(4) make && sudo make install

STEP 6 - Add the license to the file ~/kinect/OpenNI/Data/SamplesConfig.xml like this:

<OpenNI>

<Licenses>

<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdY4"/>

</Licenses>

STEP 7 - Test if everything is working fine by running the samples from the OpenNI folder:

$ cd ~/kinect/OpenNI/Samples/Bin/Release/

Figure [OpenNI] depicts the sample program User Tracker:

$cd ~/kinect/OpenNI/Platform/Linux/Bin/x86-Release

$ ./Sample-NiUserTracker

The official documentation for the OpenNI installation is inexistent - the steps were adapted from the forum articles [OpenNI01, OpenNI02].

[OpenNI01] http://openni-discussions.979934.n3.nabble.com/OpenNI-dev-Kinect-on-Debian-The-device-is-not-connected-td3446024.html
[OpenNI02] http://www.keyboardmods.com/2010/12/howto-kinect-openninite-skeleton.htm