Intel Realsense Hand Toolkit for Unity is toolkit for developing on hand tracking feature in Unity application with Intel Realsense camera easier.
Unity3D
Intel Realsense SDK
Intel Realsense Full Hand Tracking and Gesture Recognition SDK
F200/SR300 Camera Driver
Noted: R200
is not supported, because Intel Realsense Full Hand Tracking and Gesture Recognition SDK
is not available in R2
.
-
Connect depth camera by USB 3.0+
-
Drag
DepthCameraManager
Prefabs inAssets/IRToolkit/Prefabs
to Scene -
Write Script !
Sign
is number that will be multiply with x-axis of hand's position. User can adjust it to 1 or -1.
- 1 is worked for Head Mounted Display Device
- -1 is worked for Normal Display Device
Is Enable All Gesture
is boolean for enable all of gesture in system.
If Is Enable All Gesture
is false, system will enable all of gesture those mention in Gesture Actions
.
void Start()
{
GameObject.Find("DepthCameraManager").GetComponent<HandPositionManager>().AddSubscriber(gameObject);
}
void OnLeftHandChange(Vector3 handPosition)
{
// Do your work when left hand position is updated
}
void OnRightHandChange(Vector3 handPosition)
{
// Do your work when right hand position is updated
}
void OnLeftHandAppear()
{
// Do your work when left hand is appeared
}
void OnLeftHandDisappear()
{
// Do your work when left hand is disappeared
}
void OnRightHandAppear()
{
// Do your work when right hand is appeared
}
void OnRightHandDisappear()
{
// Do your work when right hand is disappeared
}
void Start()
{
GameObject.Find("DepthCameraManager").GetComponent<GesturalManager>().AddSubscriber(gameObject);
}
- void On+
GestureName
() - void On+
HandSide
+Hand+GestureName
()
void OnGesture(GestureData data){
// Do your work
// data.name is gesture name
}
void OnThumbUp(){
// Do your work here when current gesture is thumb up
}
void OnLeftHandThumbUp(){
// Do your work here when left hand gesture is thumb up
}
void OnRightVSign(){
//Do your work here when right hand gesture is v sign
}
MIT License
Copyright (c) 2017 Voraton Lertrattanapaisal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.