Go to Post They have a Woodie Flowers Finalist, Outstanding Volunteer and numerous UFH Awards to demonstrate this as well. You do not receive any of these accolades without doing something right. - J Flex 188 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-01-2012, 10:17
nydnh01 nydnh01 is offline
Registered User
AKA: Naresh Hing
FRC #1601 (Quantum Samurai)
Team Role: Alumni
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Richmond Hill, NY
Posts: 43
nydnh01 is an unknown quantity at this point
Re: Programming Kinect

According to the National Instruments example it shows that the kinect uses an index array to get the hand gestures but when connecting the kinect extra class it does not give that option to use the hand for the gestures.
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2012, 13:34
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

Here is the code for the Cluster VI. This needs no modification to work.

The example code is purely example code, and has two fairly simple examples to look at. The code can be placed into the autonomous loop, and then deployed.

Please give reference to Team 3130, the E.R.R.O.R.'s.
Attached Files
File Type: vi Kinect Vertex to Cluster.vi (29.2 KB, 81 views)
File Type: vi Example Kinect Code.vi (12.3 KB, 28 views)
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2012, 13:36
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

As a side note, you should check out the internal workings of my VI. Now imagine having an index array everywhere that you need a vertex broken out. An unbundle by name works extremely well for this purpose.
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2012, 13:42
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

Quote:
Originally Posted by nydnh01 View Post
According to the National Instruments example it shows that the kinect uses an index array to get the hand gestures but when connecting the kinect extra class it does not give that option to use the hand for the gestures.
You are correct. The Get Kinect Extra VI actually grabs extra data relating to actually tracking. What you use to get the Vertex is the Get Kinect Vertices, and then normally, you use an Index Array to get the actual vertex info. I use my VI, which converts that array into a named cluster, which can then be unbundled.
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2012, 15:22
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Programming Kinect

I'm happy to see that you wrote a converter to a cluster, but there are a few things worth mentioning.

You can grow the index array and it will extract the next element without an enum cluster wired up. That syntax shortcut comes in handy pretty often.

I attached an alternate implementation that keeps the original cluster order (which matches the Microsoft header file), and uses some casting to simplify the diagram. I also attached a typedef for the cluster. Because ctls are not a supported upload type, they are in a zipped folder.

Greg McKaskle
Attached Files
File Type: zip Vertex Array to Cluster.zip (23.2 KB, 18 views)
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2012, 16:07
zaphodp.jensen zaphodp.jensen is offline
Alumni and Mentor of 3130
AKA: Pierce Jensen
FRC #3130 (East Ridge Robotics Ominous Raptors (E.R.R.O.R.'s))
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2009
Location: Minnesota
Posts: 76
zaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the roughzaphodp.jensen is a jewel in the rough
Re: Programming Kinect

The only reason that I had the enums wired up was because I was not sure as to what the order of the array was going to be, and I wanted them to be in a specific order in the cluster.
If you do not know the order of the array, it is always safer to wire in all of the enums to ensure that the output is the correct value from the array.

But thanks for the code anyways!
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2012, 23:19
SuperS_5's Avatar
SuperS_5 SuperS_5 is offline
[Certified LabVIEW Developer]
FRC #1219
 
Join Date: Dec 2010
Rookie Year: 2010
Location: Canada
Posts: 140
SuperS_5 will become famous soon enoughSuperS_5 will become famous soon enough
Re: Programming Kinect

Quote:
Originally Posted by Greg McKaskle View Post
I attached an alternate implementation that keeps the original cluster order (which matches the Microsoft header file), and uses some casting to simplify the diagram.
Greg McKaskle
Hey Greg, thanks for the converter VI, could be useful but noticed one thing. The array to cluster function was left at the default of 9 elements. It would have to be set to 20 if you want the whole control to be casted.
__________________
Mike B
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi