kinectsdk + openni/nite at the same time

3,790 views
Skip to first unread message

Amir Hirsch

unread,
Jun 19, 2011, 6:04:45 PM6/19/11
to openn...@googlegroups.com

Joshua Blake

unread,
Jun 19, 2011, 6:21:15 PM6/19/11
to openn...@googlegroups.com

Interesting... Any details on implementation? I'm not really sure if this is showing two Kinects or an OpenNI plug in for the Kinect SDK.

> --
> You received this message because you are subscribed to the Google Groups "OpenNI" group.
> To post to this group, send email to openn...@googlegroups.com.
> To unsubscribe from this group, send email to openni-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
>

Amir Hirsch

unread,
Jun 19, 2011, 6:27:40 PM6/19/11
to openn...@googlegroups.com
Two kinects, but I'm actively working on the OpenNI plugin for the KinectSDK and hope to also provide the skeleton as a pass through library.

Of interest will be how microsoft responds to already commercially available OpenNI software benefiting from an adapter like this....

Amir

Amir Hirsch

unread,
Jun 20, 2011, 1:16:28 AM6/20/11
to openn...@googlegroups.com
So I've gotten a little progress on this.

I've been able to build the NiSampleModule example in OpenNI with some
modifications that cause it to initialize the Kinect SDK.

I can also register it with niReg as a Depth node. the only difficult
part was you have to run niReg as administrator (I spent 2 hours on
that part and like 5 minutes on the rest)

Almost there....

Amir

MichaelK

unread,
Jun 20, 2011, 4:27:53 AM6/20/11
to OpenNI
Any hints, how this works?

Ibrahim

unread,
Jun 20, 2011, 6:45:56 AM6/20/11
to OpenNI
i have installed the microsoft sdk and my openni programs stopped
working. is there any solution to this problem. i tried reinstalling
the primesense drivers and uninstalling the micrisoft drivers but
still somehow the microsoft drivers automatically reinstall

Sam Muscroft

unread,
Jun 20, 2011, 6:59:31 AM6/20/11
to OpenNI
ON Win 7 you need to uninstall microsoft sdk and then re-install avin
sensor kinect drivers for openni (no need to uninstall NITE / OpenNI
libraries). This worked for me yesterday with the kinect plugged in
throughout.

Cheers,

S.

Ibrahim

unread,
Jun 20, 2011, 7:25:53 AM6/20/11
to OpenNI
so then u have to basically uninstall and reinstall everytime u want
to shift from one to another..

noisecrime

unread,
Jun 20, 2011, 7:26:57 AM6/20/11
to OpenNI


On Jun 20, 6:16 am, Amir Hirsch <a...@tinkerheavy.com> wrote:
> So I've gotten a little progress on this.
>
> I've been able to build the NiSampleModule example in OpenNI with some
> modifications that cause it to initialize the Kinect SDK.
>
> I can also register it with niReg as a Depth node. the only difficult
> part was you have to run niReg as administrator (I spent 2 hours on
> that part and like 5 minutes on the rest)
>
> Almost there....

Nice work, keep going it will be done in no time ;)

Will this mean it is usable directly in unity or does the need
for .Net 4 mean we'll have to find some other means of transferring
the data? Thats the only bit that concerns me, I mean fair enough for
tracking data, but not for image data.

BTW - been working on improvements to the new Unity Wrapper, adding
support for image and label, as well as optimisation of setPixels. Did
have a few queries about certain approaches in the wrapper, but i'll
discuss them on UnityKinect once I release this update.

Sam Muscroft

unread,
Jun 20, 2011, 7:30:00 AM6/20/11
to OpenNI
No, only unininstall microsoft sdk and then re-install avin kinect
sensor driver (not Openni and Nite.) This is until there is a plugin/
workaround which it seems is not far off judging by the previous posts
by Amir.

MichaelK

unread,
Jun 20, 2011, 9:26:38 AM6/20/11
to OpenNI
But when you uninstall the MS SDK, you can't use this anymore!? The
question is, how can openNI and the MS SDK co-exist, without
uninstalling anything to use the other thing.

Sam Muscroft

unread,
Jun 20, 2011, 9:31:36 AM6/20/11
to OpenNI
Michael - I was replying to Ibrahim, who had asked how to re-instate
OpenNi after installing / uninstalling microsoft sdk.
Message has been deleted

Amir Hirsch

unread,
Jun 21, 2011, 6:24:34 AM6/21/11
to openn...@googlegroups.com
Latest update: I can get the Kinect to turn on using the Kinect SDK
invoked through OpenNI module.

I am modifying NiSampleModule to get depth from msft Kinect SDK and
feed it to OpenNI.

First the DLL hell stuff in VS2010:
your "additional dependencies" in the project properties -> linker ->
input add MSRKinectNUI.lib
MSRKinectNUI.lib;openNI.lib;%(AdditionalDependencies)

i dragged the msrkinectnui.lib into my project too for good measure

in the VC++ directories settings:
$(MSRKINECTSDK)\inc to include
$(MSRKINECTSDK)\lib to libraries


in SampleDepth.cpp i now initialize the kinect with the Kinect SDK. I
needed to include some headers:


#include "wtypes.h"
#include "MSR_NuiApi.h"

..
and modify init:

XnStatus SampleDepth::Init()
{
m_pDepthMap = new XnDepthPixel[SUPPORTED_X_RES * SUPPORTED_Y_RES];
if (m_pDepthMap == NULL)
{
return XN_STATUS_ALLOC_FAILED;
}

m_hNextDepthFrameEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
HRESULT hr;

hr = NuiInitialize(
NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX |
NUI_INITIALIZE_FLAG_USES_SKELETON | NUI_INITIALIZE_FLAG_USES_COLOR);
if( FAILED( hr ) )
{
// MessageBoxResource(m_hWnd,IDS_ERROR_NUIINIT,MB_OK | MB_ICONHAND);
return XN_STATUS_ALLOC_FAILED;;
}



hr = NuiImageStreamOpen(
NUI_IMAGE_TYPE_DEPTH_AND_PLAYER_INDEX,
NUI_IMAGE_RESOLUTION_320x240,
0,
2,
m_hNextDepthFrameEvent,
&m_pDepthStreamHandle );
if( FAILED( hr ) )
{
// MessageBoxResource(m_hWnd,IDS_ERROR_DEPTHSTREAM,MB_OK | MB_ICONHAND);
return XN_STATUS_ILLEGAL_POSITION ;
}


return (XN_STATUS_OK);
}

the XnStatus return types in the hr error is just me being ridiculous.


also in SampleDepth.h
XnBool m_bMirror;
ChangeEvent m_generatingEvent;
ChangeEvent m_dataAvailableEvent;
ChangeEvent m_mirrorEvent;


//ADDED BY AMIR FOR KinectSDK binding
HANDLE m_hThNuiProcess;
HANDLE m_hEvNuiProcessStop;
HANDLE m_pDepthStreamHandle;
HANDLE m_hNextDepthFrameEvent;

};


now i build it and then register it with: nireg -r NiSampleModule.dll
(don't forget to run this step in admin mode)
nireg -l now lists my samplemodule.dll
F:\Hacking\OpenNI\OpenNI\Platform\Win32\Bin\Debug\NiSampleModule.dll (compiled w
ith OpenNI 1.1.0.39):
Depth: OpenNI/SampleDepth/1.1.0.39


i was getting problems that looked like this:
F:\Hacking\OpenNI\OpenNI\Platform\Win32\Bin\Debug\NiSampleModule.dll 26920
[WARNING] Failed to load library 'F:\Hacking\OpenNI\OpenNI\Platform\Win32\
Bin\Debug\NiSampleModule.dll'. Error code: 87
27160 [WARNING] Failed to load 'F:\Hacking\OpenNI\OpenNI\Platfor
m\Win32\Bin\Debug\NiSampleModule.dll' - missing dependencies?

this error occured until i included the MSRKinectNUI.lib in the
additional dependencies. but then after several hours discovered my
folly.


ok so then i modified samplesconfig.xml in the OpenNI/data directory
to look only for a depth node (i'm testing with usertracker which only
consumes depth)

<OpenNI>
<Licenses>
<!-- Add licenses here
<License vendor="vendor" key="key"/>
-->
</Licenses>
<Log writeToConsole="false" writeToFile="false">
<!-- 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default) -->
<LogLevel value="3"/>
<Masks>
<Mask name="ALL" on="true"/>
</Masks>
<Dumps>
</Dumps>
</Log>
<ProductionNodes>
<Node type="Depth" name="Depth1">
<Configuration>
<Mirror on="true"/>
</Configuration>
</Node>
</ProductionNodes>
</OpenNI>

now i haven't started the NUIThread and mapped the depth frames to
OpenNI, but when i run UserTracker my kinect turns on, implying a
connection between openni and kinectsdk is working.

so now someone else can avoid my errors and probably get it done
tomorrow before i even wake up.

Amir

alex summer

unread,
Jun 22, 2011, 10:10:52 AM6/22/11
to OpenNI
I hope this works! Keep us informed of the progress, you're almost
done!!!
This will be very usefull to everyone! Cheers :D

Alex
> > On Sun, Jun 19, 2011 at 3:27 PM, Amir Hirsch <a...@catalystac.com> wrote:
> >> Two kinects, but I'm actively working on the OpenNI plugin for the KinectSDK
> >> and hope to also provide the skeleton as a pass through library.
> >> Of interest will be how microsoft responds to already commercially
> >> available OpenNI software benefiting from an adapter like this....
> >> Amir
>
> >> On Sun, Jun 19, 2011 at 3:21 PM, Joshua Blake <joshbl...@gmail.com> wrote:
>
> >>> Interesting... Any details on implementation? I'm not really sure if this
> >>> is showing two Kinects or an OpenNI plug in for the Kinect SDK.
>

Amir Hirsch

unread,
Jun 22, 2011, 1:14:17 PM6/22/11
to openn...@googlegroups.com
So NiViewer can draw the data from our depth node that produces frames
through the KinectSDK now.

But when I try to use the usertracker example I get some nonsense
about maxShift:

C:\Program Files (x86)\OpenNI\Samples\Bin\Release>NiUserTracker.exe
Attempting to open \\?\USB#VID_045E&PID_02AE#B00363600976047B#{00873FDF-61A8-11D
1-EF5E-00C04F2D728B}\00
KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00363600976047B#{00873FDF-61A8-11
D1-EF5E-00C04F2D728B}\00\PIPE01)
KinectCamera_OpenStreamEndpoint Opened successfully.
Couldn't get maxShift.
Couldn't get maxShift.
Find user generator failed: Error!

working on it..

Amir

Tomoto

unread,
Jun 22, 2011, 7:43:28 PM6/22/11
to OpenNI
Hi Amir and everyone,

I got the same "maxShift" issue, and, so far, it looks nontrivial to
get through it...

It seems NITE's skeleton tracker only works with PrimeSense devices
according to the following discussion:
http://groups.google.com/group/openni-dev/browse_thread/thread/f9dbfd4069722f9d/eddba6aa76c53fbd?lnk=gst&q=maxshift#eddba6aa76c53fbd
. (Note Kinect could be a "3rd party device" for PrimeSense if covered
by Microsoft's driver.) Also, I found XnDepthStream#GetMaxShift method
in the source code of SensorKinect. I guess NITE depends on this
method and apparently Microsoft's driver does not have it.

To avoid this issue, probably we need to wrap Microsoft's skeleton
tracker for OpenNI so that we could (unwillingly) skip NITE at all.
Or, it may be possible to wrap Microsoft's Kinect driver in a way
NITE's skeleton tracker expects. In any ways, it looks nontrivial and
painful work. :-/

Anyway, I will share my source code in some public source code
repository.

Thanks,
Tomoto

Tomoto

unread,
Jun 23, 2011, 12:51:25 AM6/23/11
to OpenNI
Hi,

I made the code public at: https://www.assembla.com/code/kinect-mssdk-openni-bridge/git/nodes/

Only Depth and Image nodes work, but others (e.g. User node) do not.
It is not that cool.

Thanks,
Tomoto


On 6月22日, 午後4:43, Tomoto <tom...@gmail.com> wrote:
> Hi Amir and everyone,
>
> I got the same "maxShift" issue, and, so far, it looks nontrivial to
> get through it...
>
> It seems NITE's skeleton tracker only works with PrimeSense devices
> according to the following discussion:http://groups.google.com/group/openni-dev/browse_thread/thread/f9dbfd...
> ...
>
> もっと読む »

Amir Hirsch

unread,
Jun 23, 2011, 3:42:46 AM6/23/11
to openn...@googlegroups.com
Thanks Tomoto for producing a good project structure for this! I've
extended your work and I''ve fixed the MaxShift issue and now dealing
with other stuff now.

For everyone's reference, if you install Tomoto's dll and run
UserTracker (which uses NITE) you'll see that NITE looks for some
property called maxShift:

C:\Program Files (x86)\OpenNI\Samples\Bin\Release>NiUserTracker.exe

Attempting to open \\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11D
1-EF5E-00C04F2D728B}\00
KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11


D1-EF5E-00C04F2D728B}\00\PIPE01)
KinectCamera_OpenStreamEndpoint Opened successfully.

KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11
D1-EF5E-00C04F2D728B}\00\PIPE00)
KinectCamera_OpenStreamEndpoint Opened successfully.


Couldn't get maxShift.
Couldn't get maxShift.

Find user generator failed: Error!


I've gone down the rabbit hole of the Sensor code inheritance (someone
at PrimeSense really likes extending classes, huh?) I've discovered
that the MaxShift is a property requested through a GetIntProperty
request in the XnSensorProductionNode:

I added this little work-around to the MSRKinectDepthGenerator which
just reports 2047 when asked for the IntProperty "MaxShift"
(frankly, i don't think this property actually matters and I wonder
why NITE has dependencies on hidden properties)

XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
strName, XnUInt64& nValue) const
{
if (strName== "MaxShift")
{
nValue = 2047;
}
return XN_STATUS_OK;
}

so now it gets a MaxShift and the error looks like this saying it
can't find the shift2Depth table:

C:\Program Files (x86)\OpenNI\Samples\Bin\Release>NiUserTracker.exe

Attempting to open \\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11D
1-EF5E-00C04F2D728B}\00
KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11


D1-EF5E-00C04F2D728B}\00\PIPE01)
KinectCamera_OpenStreamEndpoint Opened successfully.

KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11
D1-EF5E-00C04F2D728B}\00\PIPE00)
KinectCamera_OpenStreamEndpoint Opened successfully.
Couldn't get shift2Depth table.
Couldn't get shift2Depth table.

ONWARD.


2011/6/22 Tomoto <tom...@gmail.com>:

>> もっと読む ≫

Amir Hirsch

unread,
Jun 23, 2011, 4:09:47 AM6/23/11
to openn...@googlegroups.com
you don't actually need to return a value for the MaxShift and can
just return XN_STATUS_OK when NITE asks for it. The shift2Depth table
is gotten through the GetGeneralProperty call:

XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
strName, XnUInt64& nValue) const
{

return XN_STATUS_OK;
}
XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
strName, XnUInt32 nBufferSize, void* pBuffer) const
{
return XN_STATUS_OK;
}

2011/6/23 Amir Hirsch <am...@tinkerheavy.com>:

Tomoto

unread,
Jun 23, 2011, 4:32:53 AM6/23/11
to OpenNI
Interesting. I figured out NITE asked the following values. Eventually
I got a "division by zero" error when just returned XN_STATUS_OK for
everything. Perhaps some proper value needs to be given..

GetIntProperty:
#define XN_STREAM_PROPERTY_MAX_SHIFT "MaxShift"
#define XN_STREAM_PROPERTY_CONST_SHIFT "ConstShift"
#define XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE "ZPD"

GetRealProperty:
#define XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE "ZPPS"
#define XN_STREAM_PROPERTY_EMITTER_DCMOS_DISTANCE "LDDIS"

GetGeneralProperty:
/** XN_DEPTH_TYPE[] */
#define XN_STREAM_PROPERTY_S2D_TABLE "S2D"
/** XnUInt16[] */
#define XN_STREAM_PROPERTY_D2S_TABLE "D2S"


On 6月23日, 午前1:09, Amir Hirsch <a...@tinkerheavy.com> wrote:
> you don't actually need to return a value for the MaxShift and can
> just return XN_STATUS_OK when NITE asks for it. The shift2Depth table
> is gotten through the GetGeneralProperty call:
>
> XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
> strName, XnUInt64& nValue) const
> {
> return XN_STATUS_OK;}
>
> XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
> strName, XnUInt32 nBufferSize, void* pBuffer) const
> {
> return XN_STATUS_OK;
>
> }
>
> 2011/6/23 Amir Hirsch <a...@tinkerheavy.com>:
> ...
>
> もっと読む ≫

Amir Hirsch

unread,
Jun 23, 2011, 4:46:58 AM6/23/11
to openn...@googlegroups.com
UserTracker runs after I put values for:

dValue in the GetRealProperty
nValue in the GetIntProperty


Unfortunately it doesn't track the user.... but it runs.

XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
strName, XnUInt64& nValue) const
{

nValue = 2047;
return XN_STATUS_OK;
}

XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
strName, XnUInt32 nBufferSize, void* pBuffer) const
{

return XN_STATUS_OK;
}

XnStatus MSRKinectDepthGenerator::GetStringProperty(const XnChar*
strName, XnChar* csValue, XnUInt32 nBufSize) const
{
return XN_STATUS_OK;
}
XnStatus MSRKinectDepthGenerator::GetRealProperty(const XnChar*
strName, XnDouble& dValue) const
{
dValue = 1.0;
return XN_STATUS_OK;
}

Amir Hirsch

unread,
Jun 23, 2011, 5:39:51 AM6/23/11
to openn...@googlegroups.com
It's definitely looking for more Int and Real properties than just
those it seems. If I return 0 for anything but those properties it
still freezes, but if I always assign a default then it's still
running.

On Thu, Jun 23, 2011 at 1:32 AM, Tomoto <tom...@gmail.com> wrote:

Tomoto

unread,
Jun 23, 2011, 6:33:42 AM6/23/11
to OpenNI
Great, it runs! (although the user tracking does not work as you say.)
I pushed the fix into the repository.

I think the properties NITE looks for are limited because I wrote a
strict code as below and it still ran. It seems the values must be
"correct" to get the user tracking worked.

--- a/src/MSRKinectDepthGenerator.cpp
+++ b/src/MSRKinectDepthGenerator.cpp
@@ -125,3 +125,34 @@ void
MSRKinectDepthGenerator::UnregisterFromViewPointChange(XnCallbackHandle
hCa
m_viewPointChangeEvent.Unregister(hCallback);
}

+XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
strName, XnUInt64& nValue) const
+{
+ // todo -- dummy values to allow UserGenerator run
+ if (strcmp(strName, "MaxShift") == 0 || strcmp(strName, "ZPD") == 0
|| strcmp(strName, "ConstShift") == 0) {
+ nValue = 2047;
+ return XN_STATUS_OK;
+ }
+ return XN_STATUS_ERROR;
+}
+
+
+XnStatus MSRKinectDepthGenerator::GetRealProperty(const XnChar*
strName, XnDouble& dValue) const
+{
+ // todo -- dummy values to allow UserGenerator run
+ if (strcmp(strName, "ZPPS") == 0 || strcmp(strName, "LDDIS") == 0) {
+ dValue = 1.0;
+ return XN_STATUS_OK;
+ }
+ return XN_STATUS_ERROR;
+}
+
+
+XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
strName, XnUInt32 nBufferSize, void* pBuffer) const
+{
+ // todo -- dummy values to allow UserGenerator run
+ if (strcmp(strName, "S2D") == 0 || strcmp(strName, "D2S") == 0) {
+ return XN_STATUS_OK;
+ }
+ return XN_STATUS_ERROR;
+}
+


On 6月23日, 午前2:39, Amir Hirsch <a...@tinkerheavy.com> wrote:
> It's definitely looking for more Int and Real properties than just
> those it seems. If I return 0 for anything but those properties it
> still freezes, but if I always assign a default then it's still
> running.
>
>
>
>
>
>
>
> On Thu, Jun 23, 2011 at 1:32 AM, Tomoto <tom...@gmail.com> wrote:
> > Interesting. I figured out NITE asked the following values. Eventually
> > I got a "division by zero" error when just returned XN_STATUS_OK for
> > everything. Perhaps some proper value needs to be given..
>
> > GetIntProperty:
> > #define XN_STREAM_PROPERTY_MAX_SHIFT "MaxShift"
> > #define XN_STREAM_PROPERTY_CONST_SHIFT "ConstShift"
> > #define XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE "ZPD"
>
> > GetRealProperty:
> > #define XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE "ZPPS"
> > #define XN_STREAM_PROPERTY_EMITTER_DCMOS_DISTANCE "LDDIS"
>
> > GetGeneralProperty:
> > /** XN_DEPTH_TYPE[] */
> > #define XN_STREAM_PROPERTY_S2D_TABLE "S2D"
> > /** XnUInt16[] */
> > #define XN_STREAM_PROPERTY_D2S_TABLE "D2S"
>
> > On 6月23日, 午前1:09, Amir Hirsch <a...@tinkerheavy.com> wrote:
> >> you don't actually need to return a value for theMaxShiftand can
> >> just return XN_STATUS_OK when NITE asks for it. The shift2Depth table
> >> is gotten through the GetGeneralProperty call:
>
> >> XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
> >> strName, XnUInt64& nValue) const
> >> {
> >> return XN_STATUS_OK;}
>
> >> XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
> >> strName, XnUInt32 nBufferSize, void* pBuffer) const
> >> {
> >> return XN_STATUS_OK;
>
> >> }
>
> >> 2011/6/23 Amir Hirsch <a...@tinkerheavy.com>:
>
> >> > Thanks Tomoto for producing a good project structure for this! I've
> >> > extended your work and I''ve fixed theMaxShiftissue and now dealing
> >> > with other stuff now.
>
> >> > For everyone's reference, if you install Tomoto's dll and run
> >> > UserTracker (which uses NITE) you'll see that NITE looks for some
> >> > property calledmaxShift:
>
> >> > C:\Program Files (x86)\OpenNI\Samples\Bin\Release>NiUserTracker.exe
> >> > Attempting to open \\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11D
> >> > 1-EF5E-00C04F2D728B}\00
> >> > KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11
> >> > D1-EF5E-00C04F2D728B}\00\PIPE01)
> >> > KinectCamera_OpenStreamEndpoint Opened successfully.
> >> > KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11
> >> > D1-EF5E-00C04F2D728B}\00\PIPE00)
> >> > KinectCamera_OpenStreamEndpoint Opened successfully.
> >> > Couldn't getmaxShift.
> >> > Couldn't getmaxShift.
> >> > Find user generator failed: Error!
>
> >> > I've gone down the rabbit hole of the Sensor code inheritance (someone
> >> > at PrimeSense really likes extending classes, huh?) I've discovered
> >> > that theMaxShiftis a property requested through a GetIntProperty
> >> > request in the XnSensorProductionNode:
>
> >> > I added this little work-around to the MSRKinectDepthGenerator which
> >> > just reports 2047 when asked for the IntProperty "MaxShift"
> >> > (frankly, i don't think this property actually matters and I wonder
> >> > why NITE has dependencies on hidden properties)
>
> >> > XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
> >> > strName, XnUInt64& nValue) const
> >> > {
> >> > if (strName== "MaxShift")
> >> > {
> >> > nValue = 2047;
> >> > }
> >> > return XN_STATUS_OK;
> >> > }
>
> >> > so now it gets aMaxShiftand the error looks like this saying it
> ...
>
> もっと読む ≫

Amir Hirsch

unread,
Jun 23, 2011, 6:36:57 AM6/23/11
to openn...@googlegroups.com
I went and tweaked Sensor to print a dump. Here's a log of the
GetIntProperty and GetRealProperty calls along with valid numbers. I'm
going to put these into your code now as return values and if that
works well... that's just epic.. otherwise i'll send a disappointing
email in 10 minutes.

GetProperty (INT): SupportedModesCount : 15
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 536870912
GetProperty (INT): SupportedModesCount : 11
GetProperty (INT): MaxShift : 2047
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 536870912
GetProperty (REAL): LDDIS : 0
GetProperty (REAL): ZPPS : 536870912
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 536870912
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 536870912
GetProperty (INT): ZPD : 120
GetProperty (INT): ConstShift : 200
GetProperty (INT): ConstShift : 200


2011/6/23 Amir Hirsch <am...@tinkerheavy.com>:

Amir Hirsch

unread,
Jun 23, 2011, 6:38:58 AM6/23/11
to openn...@googlegroups.com
oops forgot to make it %f:

GetProperty (INT): SupportedModesCount : 15
GetProperty (INT): ZPD : 120

GetProperty (REAL): ZPPS : 0.105200


GetProperty (INT): SupportedModesCount : 11
GetProperty (INT): MaxShift : 2047
GetProperty (INT): ZPD : 120

GetProperty (REAL): ZPPS : 0.105200
GetProperty (REAL): LDDIS : 7.500000
GetProperty (REAL): ZPPS : 0.105200
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 0.105200
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 0.105200

Amir Hirsch

unread,
Jun 23, 2011, 7:01:27 AM6/23/11
to openn...@googlegroups.com
So the issue is probably not related to the Int or Real values and is
probably something to do with the table. here's the output from my
code faking it (btw, needed to change strName == "foo" to
strcmp(strName,"foo") ==0

GetProperty (INT): MaxShift : 2047
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 0.105200
GetProperty (REAL): LDDIS : 7.500000
GetProperty (REAL): ZPPS : 0.105200
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 0.105200
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 0.105200
GetProperty (INT): ZPD : 120
GetProperty (REAL): ZPPS : 0.105200
GetProperty (INT): ZPD : 120
GetProperty (INT): ConstShift : 200
GetProperty (INT): ConstShift : 200

Amir Hirsch

unread,
Jun 23, 2011, 7:51:49 AM6/23/11
to openn...@googlegroups.com
ok. i've been logging all sorts of communication between NITE and
sensorkinect, but i'm too tired to examine it. It's hard to understand
what NITE is consuming directly from the Sensor that isn't obviously
exposed by OpenNI.

This all came up back in December, this thread is great:
http://groups.google.com/group/openni-dev/browse_thread/thread/f9dbfd4069722f9d

I'm nearly certain I can make a module that tricks NITE into thinking
our KinectSDK depth node is a sensorkinect equivalent.

But it's more interesting to get the user-map and their skeleton data
into OpenNI. We can generate the rotation matrices from the Position
data and also add in some pose detection capabilities. We'll need to
establish a user acquisition method that takes advantage of not
needing any calibration.


Amir


2011/6/23 Amir Hirsch <am...@tinkerheavy.com>:

Tomoto

unread,
Jun 23, 2011, 3:07:47 PM6/23/11
to OpenNI
I encoded these values but still had no luck. Then D2S and S2D might
be the key.

Tomoto

On 6月23日, 午前3:38, Amir Hirsch <a...@tinkerheavy.com> wrote:
> oops forgot to make it %f:
>
> GetProperty (INT): SupportedModesCount : 15
> GetProperty (INT): ZPD : 120
> GetProperty (REAL): ZPPS : 0.105200
> GetProperty (INT): SupportedModesCount : 11
> GetProperty (INT): MaxShift : 2047
> GetProperty (INT): ZPD : 120
> GetProperty (REAL): ZPPS : 0.105200
> GetProperty (REAL): LDDIS : 7.500000
> GetProperty (REAL): ZPPS : 0.105200
> GetProperty (INT): ZPD : 120
> GetProperty (REAL): ZPPS : 0.105200
> GetProperty (INT): ZPD : 120
> GetProperty (REAL): ZPPS : 0.105200
> GetProperty (INT): ZPD : 120
> GetProperty (INT): ConstShift : 200
> GetProperty (INT): ConstShift : 200
>
> 2011/6/23AmirHirsch <a...@tinkerheavy.com>:
>
>
>
> > I went and tweaked Sensor to print a dump. Here's a log of the
> > GetIntProperty and GetRealProperty calls along with valid numbers. I'm
> > going to put these into your code now as return values and if that
> > works well... that's just epic.. otherwise i'll send a disappointing
> > email in 10 minutes.
>
> > GetProperty (INT): SupportedModesCount : 15
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 536870912
> > GetProperty (INT): SupportedModesCount : 11
> > GetProperty (INT): MaxShift : 2047
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 536870912
> > GetProperty (REAL): LDDIS : 0
> > GetProperty (REAL): ZPPS : 536870912
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 536870912
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 536870912
> > GetProperty (INT): ZPD : 120
> > GetProperty (INT): ConstShift : 200
> > GetProperty (INT): ConstShift : 200
>
> > 2011/6/23AmirHirsch <a...@tinkerheavy.com>:
> >> It's definitely looking for more Int and Real properties than just
> >> those it seems. If I return 0 for anything but those properties it
> >> still freezes, but if I always assign a default then it's still
> >> running.
>
> >> On Thu, Jun 23, 2011 at 1:32 AM, Tomoto <tom...@gmail.com> wrote:
> >>> Interesting. I figured out NITE asked the following values. Eventually
> >>> I got a "division by zero" error when just returned XN_STATUS_OK for
> >>> everything. Perhaps some proper value needs to be given..
>
> >>> GetIntProperty:
> >>> #define XN_STREAM_PROPERTY_MAX_SHIFT                            "MaxShift"
> >>> #define XN_STREAM_PROPERTY_CONST_SHIFT                          "ConstShift"
> >>> #define XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE          "ZPD"
>
> >>> GetRealProperty:
> >>> #define XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE        "ZPPS"
> >>> #define XN_STREAM_PROPERTY_EMITTER_DCMOS_DISTANCE       "LDDIS"
>
> >>> GetGeneralProperty:
> >>> /** XN_DEPTH_TYPE[] */
> >>> #define XN_STREAM_PROPERTY_S2D_TABLE                            "S2D"
> >>> /** XnUInt16[] */
> >>> #define XN_STREAM_PROPERTY_D2S_TABLE                            "D2S"
>
> >>> On 6月23日, 午前1:09,AmirHirsch <a...@tinkerheavy.com> wrote:
> >>>> you don't actually need to return a value for the MaxShift and can
> >>>> just return XN_STATUS_OK when NITE asks for it. The shift2Depth table
> >>>> is gotten through the GetGeneralProperty call:
>
> >>>> XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
> >>>> strName, XnUInt64& nValue) const
> >>>> {
> >>>>         return XN_STATUS_OK;}
>
> >>>> XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
> >>>> strName, XnUInt32 nBufferSize, void* pBuffer) const
> >>>> {
> >>>>         return XN_STATUS_OK;
>
> >>>> }
>
> >>>> 2011/6/23AmirHirsch <a...@tinkerheavy.com>:
> >>>> >>> HiAmirand everyone,
>
> >>>> >>> I got the same "maxShift" issue, and, so far, it looks nontrivial to
> >>>> >>> get through it...
>
> >>>> >>> It seems NITE's skeleton tracker only works with PrimeSense devices
> >>>> >>> according to the following discussion:http://groups.google.com/group/openni-dev/browse_thread/thread/f9dbfd...
> >>>> >>> . (Note Kinect could be a "3rd party device" for PrimeSense if covered
> >>>> >>> by Microsoft's driver.) Also, I found XnDepthStream#GetMaxShift method
> >>>> >>> in the source code of SensorKinect. I guess NITE depends on this
> >>>> >>> method and apparently Microsoft's driver does not have it.
>
> >>>> >>> To avoid this issue, probably we need to wrap Microsoft's skeleton
> >>>> >>> tracker for OpenNI so that we could (unwillingly) skip NITE at all.
> >>>> >>> Or, it may be possible to wrap Microsoft's Kinect driver in a way
> >>>> >>> NITE's skeleton tracker expects. In any ways, it looks nontrivial and
> >>>> >>> painful work. :-/
>
> >>>> >>> Anyway, I will share my source code in some public source code
> >>>> >>> repository.
>
> >>>> >>> Thanks,
> >>>> >>> Tomoto
>
> >>>> >>> On 6月22日, 午前10:14,AmirHirsch <a...@tinkerheavy.com> wrote:
>
> >>>> >>> > So NiViewer can draw the data from our depth node that produces frames
> >>>> >>> > through the KinectSDK now.
>
> >>>> >>> > But when I try to use the usertracker example I get some nonsense
> >>>> >>> > aboutmaxShift:
>
> >>>> >>> > C:\Program Files (x86)\OpenNI\Samples\Bin\Release>NiUserTracker.exe
> >>>> >>> > Attempting to open \\?\USB#VID_045E&PID_02AE#B00363600976047B#{00873FDF-61A8-11D
> >>>> >>> > 1-EF5E-00C04F2D728B}\00
> >>>> >>> > KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00363600976047B#{00873FDF-61A8-11
> >>>> >>> > D1-EF5E-00C04F2D728B}\00\PIPE01)
> >>>> >>> > KinectCamera_OpenStreamEndpoint Opened successfully.
> >>>> >>> > Couldn't getmaxShift.
> >>>> >>> > Couldn't getmaxShift.
> >>>> >>> > Find user generator failed: Error!
>
> >>>> >>> > working on it..
>
> >>>> >>> >Amir
>
> >>>> >>> > On Wed, Jun 22, 2011 at 7:10 AM, alex summer
>
> >>>> >>> > <ezekielninju...@hotmail.com> wrote:
> >>>> >>> > > I hope this works! Keep us informed of the progress, you're almost
> >>>> >>> > > done!!!
> >>>> >>> > > This will be very usefull to everyone! Cheers :D
>
> >>>> >>> > > Alex
>
> >>>> >>> > > On Jun 21, 6:24 am,AmirHirsch <a...@tinkerheavy.com> wrote:
> >>>> >>> > >> Latest update: I can get the Kinect to turn on using the Kinect SDK
> >>>> >>> > >> invoked through OpenNI module.
>
> >>>> >>> > >> I am modifying NiSampleModule to get depth from msft Kinect SDK and
> >>>> >>> > >> feed it to OpenNI.
>
> >>>> >>> > >> First the DLL hell stuff in VS2010:
> >>>> >>> > >> your "additional dependencies" in the project properties -> linker ->
> >>>> >>> > >> input add MSRKinectNUI.lib
> >>>> >>> > >> MSRKinectNUI.lib;openNI.lib;%(AdditionalDependencies)
>
> >>>> >>> > >> i dragged the msrkinectnui.lib into my project too for good measure
>
> >>>> >>> > >> in the VC++ directories settings:
> >>>> >>> > >> $(MSRKINECTSDK)\inc to include
> >>>> >>> > >> $(MSRKINECTSDK)\lib to libraries
>
> >>>> >>> > >> in SampleDepth.cpp i now initialize the kinect with the Kinect SDK. I
> >>>> >>> > >> needed to include some headers:
>
> >>>> >>> > >> #include "wtypes.h"
> >>>> >>> > >> #include "MSR_NuiApi.h"
>
> >>>> >>> > >> ..
> >>>> >>> > >> and modify init:
>
> >>>> >>> > >> XnStatus
>
> ...
>
> もっと読む »- 引用テキストを表示しない -
>
> - 引用テキストを表示 -

Tomoto

unread,
Jun 23, 2011, 4:44:50 PM6/23/11
to OpenNI
I agree with "it's more interesting to get the user-map and their
skeleton data
into OpenNI". Actually I have a prototype of UserGenerator over MS SDK
that runs but returns nothing.

Tomoto

On 6月23日, 午前4:51, Amir Hirsch <a...@tinkerheavy.com> wrote:
> ok. i've been logging all sorts of communication between NITE and
> sensorkinect, but i'm too tired to examine it. It's hard to understand
> what NITE is consuming directly from the Sensor that isn't obviously
> exposed by OpenNI.
>
> This all came up back in December, this thread is great:http://groups.google.com/group/openni-dev/browse_thread/thread/f9dbfd...
>
> I'm nearly certain I can make a module that tricks NITE into thinking
> our KinectSDK depth node is a sensorkinect equivalent.
>
> But it's more interesting to get the user-map and their skeleton data
> into OpenNI. We can generate the rotation matrices from the Position
> data and also add in some pose detection capabilities. We'll need to
> establish a user acquisition method that takes advantage of not
> needing any calibration.
>
> Amir
>
> 2011/6/23 Amir Hirsch <a...@tinkerheavy.com>:
>
> > So the issue is probably not related to the Int or Real values and is
> > probably something to do with the table. here's the output from my
> > code faking it (btw, needed to change strName == "foo" to
> > strcmp(strName,"foo") ==0
>
> > GetProperty (INT): MaxShift : 2047
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 0.105200
> > GetProperty (REAL): LDDIS : 7.500000
> > GetProperty (REAL): ZPPS : 0.105200
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 0.105200
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 0.105200
> > GetProperty (INT): ZPD : 120
> > GetProperty (REAL): ZPPS : 0.105200
> > GetProperty (INT): ZPD : 120
> > GetProperty (INT): ConstShift : 200
> > GetProperty (INT): ConstShift : 200
>
> > On Thu, Jun 23, 2011 at 3:38 AM, Amir Hirsch <a...@tinkerheavy.com> wrote:
> >> oops forgot to make it %f:
>
> >> GetProperty (INT): SupportedModesCount : 15
> >> GetProperty (INT): ZPD : 120
> >> GetProperty (REAL): ZPPS : 0.105200
> >> GetProperty (INT): SupportedModesCount : 11
> >> GetProperty (INT): MaxShift : 2047
> >> GetProperty (INT): ZPD : 120
> >> GetProperty (REAL): ZPPS : 0.105200
> >> GetProperty (REAL): LDDIS : 7.500000
> >> GetProperty (REAL): ZPPS : 0.105200
> >> GetProperty (INT): ZPD : 120
> >> GetProperty (REAL): ZPPS : 0.105200
> >> GetProperty (INT): ZPD : 120
> >> GetProperty (REAL): ZPPS : 0.105200
> >> GetProperty (INT): ZPD : 120
> >> GetProperty (INT): ConstShift : 200
> >> GetProperty (INT): ConstShift : 200
>
> >> 2011/6/23 Amir Hirsch <a...@tinkerheavy.com>:
> >>> I went and tweaked Sensor to print a dump. Here's a log of the
> >>> GetIntProperty and GetRealProperty calls along with valid numbers. I'm
> >>> going to put these into your code now as return values and if that
> >>> works well... that's just epic.. otherwise i'll send a disappointing
> >>> email in 10 minutes.
>
> >>> GetProperty (INT): SupportedModesCount : 15
> >>> GetProperty (INT): ZPD : 120
> >>> GetProperty (REAL): ZPPS : 536870912
> >>> GetProperty (INT): SupportedModesCount : 11
> >>> GetProperty (INT): MaxShift : 2047
> >>> GetProperty (INT): ZPD : 120
> >>> GetProperty (REAL): ZPPS : 536870912
> >>> GetProperty (REAL): LDDIS : 0
> >>> GetProperty (REAL): ZPPS : 536870912
> >>> GetProperty (INT): ZPD : 120
> >>> GetProperty (REAL): ZPPS : 536870912
> >>> GetProperty (INT): ZPD : 120
> >>> GetProperty (REAL): ZPPS : 536870912
> >>> GetProperty (INT): ZPD : 120
> >>> GetProperty (INT): ConstShift : 200
> >>> GetProperty (INT): ConstShift : 200
>
> >>> 2011/6/23 Amir Hirsch <a...@tinkerheavy.com>:
> ...
>
> もっと読む ≫

Tomoto

unread,
Jun 26, 2011, 3:59:24 PM6/26/11
to OpenNI
Hello,

Finally I have implemented UserGenerator that works over MS Kinect
SDK!.
https://www.assembla.com/code/kinect-mssdk-openni-bridge/git/nodes/

Now you can use Depth, Image, and User nodes. This UserGenerator
implementation directly passes through the user and skeleton data
recognized by Kinect SDK to the application, so the recognition
process is all done by Kinect SDK without NITE. You can see the user
tracking starts without psi pose as well as other different behaviors
of Kinect SDK from NITE.

I tested this module with NiUserTracker and my Hacks (kinect-ultra and
kinect-kamehameha), and they were "a sort of working". It is not
perfect, though. For example, the slight difference of the joint
position could make the application hard to use and require some
tuning.

Enjoy!
Tomoto
> > >>>>>> you don't actually need to return a value for theMaxShiftand can
> > >>>>>> just return XN_STATUS_OK when NITE asks for it. The shift2Depth table
> > >>>>>> is gotten through the GetGeneralProperty call:
>
> > >>>>>> XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
> > >>>>>> strName, XnUInt64& nValue) const
> > >>>>>> {
> > >>>>>> return XN_STATUS_OK;}
>
> > >>>>>> XnStatus MSRKinectDepthGenerator::GetGeneralProperty(const XnChar*
> > >>>>>> strName, XnUInt32 nBufferSize, void* pBuffer) const
> > >>>>>> {
> > >>>>>> return XN_STATUS_OK;
>
> > >>>>>> }
>
> > >>>>>> 2011/6/23 Amir Hirsch <a...@tinkerheavy.com>:
>
> > >>>>>> > Thanks Tomoto for producing a good project structure for this! I've
> > >>>>>> > extended your work and I''ve fixed theMaxShiftissue and now dealing
> > >>>>>> > with other stuff now.
>
> > >>>>>> > For everyone's reference, if you install Tomoto's dll and run
> > >>>>>> > UserTracker (which uses NITE) you'll see that NITE looks for some
> > >>>>>> > property calledmaxShift:
>
> > >>>>>> > C:\Program Files (x86)\OpenNI\Samples\Bin\Release>NiUserTracker.exe
> > >>>>>> > Attempting to open \\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11D
> > >>>>>> > 1-EF5E-00C04F2D728B}\00
> > >>>>>> > KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11
> > >>>>>> > D1-EF5E-00C04F2D728B}\00\PIPE01)
> > >>>>>> > KinectCamera_OpenStreamEndpoint Opened successfully.
> > >>>>>> > KinWinDeviceName = (\\?\USB#VID_045E&PID_02AE#B00366707565050B#{00873FDF-61A8-11
> > >>>>>> > D1-EF5E-00C04F2D728B}\00\PIPE00)
> > >>>>>> > KinectCamera_OpenStreamEndpoint Opened successfully.
> > >>>>>> > Couldn't getmaxShift.
> > >>>>>> > Couldn't getmaxShift.
> > >>>>>> > Find user generator failed: Error!
>
> > >>>>>> > I've gone down the rabbit hole of the Sensor code inheritance (someone
> > >>>>>> > at PrimeSense really likes extending classes, huh?) I've discovered
> > >>>>>> > that theMaxShiftis a property requested through a GetIntProperty
> > >>>>>> > request in the XnSensorProductionNode:
>
> > >>>>>> > I added this little work-around to the MSRKinectDepthGenerator which
> > >>>>>> > just reports 2047 when asked for the IntProperty "MaxShift"
> > >>>>>> > (frankly, i don't think this property actually matters and I wonder
> > >>>>>> > why NITE has dependencies on hidden properties)
>
> > >>>>>> > XnStatus MSRKinectDepthGenerator::GetIntProperty(const XnChar*
> > >>>>>> > strName, XnUInt64& nValue) const
> > >>>>>> > {
> > >>>>>> > if (strName== "MaxShift")
> > >>>>>> > {
> > >>>>>> > nValue = 2047;
> > >>>>>> > }
> > >>>>>> > return XN_STATUS_OK;
> > >>>>>> > }
>
> > >>>>>> > so now it gets aMaxShiftand the error looks like this saying it
> ...
>
> もっと読む ≫

Amir Hirsch

unread,
Jun 26, 2011, 9:00:29 PM6/26/11
to openn...@googlegroups.com
even though you can't shoot fireballs, you're a real hero! :)

Amir

2011/6/26 Tomoto <tom...@gmail.com>:

Joshua Blake

unread,
Jun 26, 2011, 9:41:40 PM6/26/11
to openn...@googlegroups.com
Tomoto,
 
That's great news. I'll try it out sometime soon and let you know how it works with my apps.
 
Josh

---
Joshua Blake
Microsoft Surface MVP
OpenKinect Community Founder http://openkinect.org

(cell) 703-946-7176
Twitter: http://twitter.com/joshblake
Blog: http://nui.joshland.org
Natural User Interfaces in .NET book: http://bit.ly/NUIbook





2011/6/26 Tomoto <tom...@gmail.com>

Tomoto

unread,
Jun 27, 2011, 2:02:13 AM6/27/11
to OpenNI
Amir, Josh,

This is a quick hack in a couple of days, and I have skipped
implementing a number of details. Let me know your experience. Also I
think I could add you as team members so that you could directly
modify the code in the repository.

Thanks,
Tomoto

On 6月26日, 午後6:41, Joshua Blake <joshbl...@gmail.com> wrote:
> Tomoto,
>
> That's great news. I'll try it out sometime soon and let you know how it
> works with my apps.
>
> Josh
>
> ---
> Joshua Blake
> Microsoft Surface MVP
> OpenKinect Community Founderhttp://openkinect.org
> ...
>
> もっと読む ≫

Joshua Blake

unread,
Jun 27, 2011, 2:14:27 PM6/27/11
to openn...@googlegroups.com
Tomoto:
 
LOL @:
	virtual XnBool NeedPoseForCalibration()
	{
		return FALSE; // yay!
	}
I tested the bridge with InfoStrat.MotionFx (using OpenNI.Net) and it works after I changed these:
 
* Added to the openni.xml file the User node with query (per Readme)
* Removed from openni.xml Gesture and Hands nodes
* Commented out in my code where it subscribes to the PoseDetected event. This caused a not supported error. (I suppose I could have checked whether the capability is supported before subscribing but I didn't.)
* Changed some code that requires NewUser to be called before CalibrationEnd.
 
That last point illustrates a bug - CalibrationEnd event is called for a user before the NewUser event.
 
I also noticed that the skeleton has a lot more jitter than expected. I'm looking through your code to see whether you set up the skeleton smoothing parameters.
 
Side note should probably go on a separate thread:
Seeing a new implementation of the various generators and comparing the OpenNI and Kinect SDK APIs makes me think that we need to have a discussion as a community about iterating the OpenNI APIs to be more flexible for different types of generators. One example is that the OpenNI UserGenerator API is basically a direct wrapper for NITE including it's limitations and requirements about pose detection and calibration. We should figure out how to have a standard, generic API but also elegantly allow access to new or special features that a Generator exposes.
 
Josh

 
2011/6/27 Tomoto <tom...@gmail.com>
> ...
>
> もっと読む ≫

Amir Hirsch

unread,
Jun 27, 2011, 3:03:40 PM6/27/11
to openn...@googlegroups.com
To your last point, I've brought this up before since calibration-free skeleton tracking still requires some method of player determination. If we only get to track two skeletons but there are 5 users, how do we determine who is player 1 and player 2?

One option is to look for a pose: cycle the skeleton tracker to look at each user for a fixed amount of time until you find one standing in the pose
another option is location based: find the user standing based on where they are standing. yet another options is to use speech recognition with mic-array location to determine which player to skeleton-track.




Amir


2011/6/27 Joshua Blake <josh...@gmail.com>