Regards,
Moshe Blitz
Support Manager
Prime Sense LTD
/usr/etc/primesense/XnVHandGenerator/Nite.ini
Peter
--
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.
--
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.
I wanted to offer a new alternative way for addressing the Multiple Hands issue that might assist you.
Attached please find a sample (windows based), containing the code of XnVSecondaryFilter, This sample contains the class itself, and a sample that uses it, all in the main.cpp file.
The class inherits from XnVPointFilter class. This means it receives PointMessages, and sends PointMessages.
It sends all the points it receives, but changes the primary point.
Expected behavior:
1. When there is only one point in the system, it will be the primary in the main tree, and also in the SecondaryFilter's subtree.
2. If there are multiple points in the system, the primary point in the SecondaryFilter's subtree will always be different than the primary point in the main tree.
3. This means that if the primary point from the main tree has disappeared, and the SecondaryFilter's point is selected as the primary point of the main tree, it will no longer be the SecondaryFilter's point (if there are additional points available to switch to)
In the sample, the new XnVSecondaryFilter and XnVSessionManager are connected. There are 2 XnVPushDetectors: one is connected directly to the XnVSessionManager, and will therefore work on the Primary Point; the other is connected to the XnVSecondaryFilter, and will therefore work on the Secondary Point. When there is only one point in the system, both will work on it.
Please note that this is a simple example of how one could create such a filter, if you need a different algorithm for choosing the primary point or extending its capabilities to support more than two points you are more than welcome to alter the code as you see fit.
REMINDER NOTE: OFFICIALLY MULTIPLE HANDS IS NOT A SUPPORTED FEATURE IN NITE!
Best Regards,
Lior Cohen
Sebastian
> > > > > openni-dev+be@googlegrou ps.com>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/openni-dev?hl=en.
--
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.
I've received a failure notice on my last posting so I've removed the attachment and added a link instead to the posting:
I wanted to offer a new alternative way for addressing the Multiple Hands issue that might assist you.
I've uploaded a sample (windows based) to http://rapidshare.com/#!download|76|442037836|SecondaryPrimaryPoint.zip|15.292, containing the code of XnVSecondaryFilter, This sample contains the class itself, and a sample that uses it, all in the main.cpp file.
Very nice work, I only wanted to emphases the differences between the two approaches.
The advantage of having the decision on which point should be the primary point in a PointFilter is that:
1) The logic of choosing and setting a new primary point is done once
2) You can add any control/s as a listener to it and the entire NITE branch that is connected to the PointFilter will work with this primary point.
On the other hand when you change the control/s to choose a hand point to work with, you are doing the "point filtering" at each one of the controls and also you need to create new "special" controls collection (MyWaveDetector, MySwipeDetector, MySelectableSlider1D, ...).
Another technical problem that I've encounter when trying to use MyPushDetector was that because both MyPushDetector and BaseControl inherits from XnVPointControl (XnVPushDetector is also a XnVPointControl) and XnVPointControl is also XnVPointListener, there is an ambiguity as to which "XnVPointListener" should be used.
Perhaps, if you wish to create an independent MyPushDetector that can use a different handpoint as a primary handpoint is to create a Compound Control that has a modified PointFilter that is connected to a regular XnVPushDetector in a single class. You can do that also to any other control e.g., MyWaveDetector. You can look at the "Sample-Boxes" that is included in the NITE installation for a reference code for creating a Compound Control (MyBox).
Best Regards,
Lior Cohen
-----Original Message-----
From: openn...@googlegroups.com [mailto:openn...@googlegroups.com] On Behalf Of Iker Saint
Sent: Wednesday, January 05, 2011 9:05 PM
To: OpenNI
Subject: [OpenNI-dev] Re: Multi Hand Cursor with Kinect
}
BaseControl::~BaseControl()
{
}
}
XnVMultipleHands NewHands( hands );
NewHands.ReassignPrimary( nID );
XnVPushDetector::Update( NewHands );
}
}
Best Regards.
--
At the moment there is no access to the XnVMultipleHands via C# wrapper (ManagedNite.dll). What you can do for now is create a managed code that handles this exact code and reviles a C# API for your application. Ether warp the XnVSecondaryFilter or the XnVMultipleHands (which is probably harder).
Best Regards,
Lior Cohen
--
--
View this message in context: http://openni-discussions.979934.n3.nabble.com/OpenNI-dev-Multi-Hand-Cursor-with-Kinect-tp2107192p3090288.html
Sent from the OpenNI discussions mailing list archive at Nabble.com.
--
View this message in context: http://openni-discussions.979934.n3.nabble.com/OpenNI-dev-Multi-Hand-Cursor-with-Kinect-tp2107192p3200273.html