Forum

Remove duplicates in a spread

Hi All,

I’d like to know what the best way is the to get rid of the duplicates in a spread.

I’m using the Leap pack and wanted to track only the index finger(s). If one hand is presented all is fine, 3x3Dvectors represents the index finger.
If two hands are presented then instead of 6x3Dvectors I have 12.

So, I’d like to remove all the duplicates.

Any help appriciated!
@microdee

how about a simple GetSpread(Spreads) to just take out the first hand? that should do :)

1st of all a finger has 4 bones so 4x3D vector, but you can getslice individual finger objects before they’re being split so you don’t have to deal with vector count and other shenanigans

in the latest alpha we have a leap implementation with left/right hand and all fingers as individual objects. might be what you are looking for…

Does it support https://developer.leapmotion.com/orion yet?

@mrboni: no it is based on the previous sdk

@mrboni: i have an orion implementation, it’s working great, i’ll probably push it to github today or tomorrow

I bet you do!

Look forward to trying it. Thanks muchly

@motzi> I’m rookie in v4 but as I wrote in the post I managed to take both index fingers (with GetSlice / GetSpread) :)

@microdee> you were right, much easier to filter out the index finger with FingerList and Finger nodes, then to understand the vector count.

So back to the original question “removing the duplicates”. As far as I know GetSlice / GetSpread can’t do it, specially when you don’t know the index of them. But Occurence(Vector3D) did it!

My question was lame and not so clear, sorry about that and thanks for the replies.