A Bonsai library for interfacing with depth cameras through OpenNI.
This library depends on NiWrapper.Net, a .NET wrapper for OpenNI. Its NuGet package includes all the required native binaries and uses Baseclass.Contrib.Nuget.Output to install them. Unfortunately Bonsai still does not support this.
To use this library you have to perfom the following:
- Download the NiWrapper.Net.x64 package.
- Rename its extension to
.zip
- Expand the compressed file.
- Copy the contents of the
Output
folder to the root folder of Bonsai. The folder location can be found in the registry under\HKEY_CURRENT_USER\SOFTWARE\Goncalo Lopes\Bonsai\InstallDir
. - There's not yet a published package of this project because its instalation using the package manager fails. You can start this project from inside Visual Studio and it will start Bonsai by passing the library in a
--lib
parameter.
- From the toolbox, under
Source/OpenNI
, drag aDevice
into the workspace. - In the properties, set the
Index
to the required value. Opening the drop down shows the list of available devices. - From the toolbox, under
Combinator/OpenNI
, drag aVideoStream
into the workspace. Make sure it connects to theDevice
. - In the properties, set
Sensor Type
to the type of stream you want (Depth
,Ir
orColor
). Make sure to set the properties, under theVideo Mode
category, to values supported by the physical device. - A
Device
may support more than oneVideoStream
connected simultaneously. - In the toolbox, under
Transform/OpenNI
, you can findDepthTruncate
. It allows to truncate values that are less thanNearThresholdValue
and greater thanFarThresholdValue
properties. The output can be binarized by setting theBinary
property. The output can also be converted to 8 bit, by setting theConvert8Bit
property totrue
. This allows the connection toFindContours
.