SlideShare a Scribd company logo
1 of 23
Taking the Leap with
Leap Motion
Iris Classon
About me
• Technical Evangelist at Telerik (WinRT)
• Software Developer at Dotnet Mentor
• Microsoft MVP C# and member of MEET
• MCSD, MCPD, MCTS
• Organizer Sweden Pluralsight Study Group (Gothenburg)
• Started learning programming from 0 summer 2011
• Licensed clinical Dietitian and Int.Lic. Personal Trainer
Contact details
• www.irisclasson.com
• Twitter
• @IrisClasson
• Email
• Telerik – iris.classon@telerik.com
• Dotnet Mentor – iris.classon@dotnetmentor.se
What is the Leap Motion?
To get started
• Mac, Windows, Linux (latest OS – more or less)
• Developer Unit of Leap Motion
• Preorder or apply to get one
• Purchase: release projected for 22nd of July
• https://www.leapmotion.com/
• SDK
• Can’t be shared
• Forum, samples and documentation available
• Projects on GitHub
• Breaking changes introduced between SDK versions- might need to update the code
Good to know
• Still in Beta
• Developer units vs. consumer units:
• The size and weight
• Final hardware components & casing
• Field of view approx 20% wider in consume version
Do not forget
• Dispose Frame object when done with it
• RemoveListener from Controller when app closes
• Dispose Controller afterwards
• Add Leap.DLL, LeapCSHarp.DLL &
LeapCSHarp.NET4.0.DLL
• Set copy output to Copy Always
• Reference the LeapCSHarp.NET4.0.DLL
When in trouble w. the device
• USB-cable has been known to cause trouble
• Change USB port and/or cable
• Connect the Leap before running the executable
• Make sure there is light and the device is clean
• Calibrate screen
• Use the Leap Vizualiser to check if it works
The Leap story
• Small startup based in San Fransisco
• Venture capital
• Has grown from just a few people to 80 employees and still hiring
• Asus and HP on board
• 40 000 Devs signed up
• 12 000 dev units shipped so far
• Still shipping
Demo
The Airspace Store
• Storefront to gather all the apps
• Dev decides on pricing, distribution & platform supported
• Non-exclusive distribution
• Min price starts at jus below 1 USD
• Industry standard at 70% to the developer
• Apps manually tested before publishing
Available languages
• C++
• C#
• Objective C
• Java
• Python
• JavaScript
• (Ruby => hack)
How the API works
• Leap motion detects fingers/tools
• Data captured as frames continously
• Listener class handles events from the Frame class
• Controller is the connection between device and app
• To listen for the updates on the Frame data:
controller.AddListener(listener)
• Gestures must be enabled through the controller
controller.EnableGesture(Gesture.GestureType.TYPESWIPE)
ID,
Timestamp,
Hands,
Fingers,
Tools,
Gestures
Frame
Translation,
RotationAxis,
RotationAngle,
Scalefactor
Motion factors
Code – C#
class SampleListener : Listener
public override void OnFrame(Controller controller)
{
// Get the most recent frame and report some basic information
Frame frame = controller.Frame();
SafeWriteLine("Frame id: " + frame.Id
+ ", timestamp: " + frame.Timestamp
+ ", hands: " + frame.Hands.Count
+ ", fingers: " + frame.Fingers.Count
+ ", tools: " + frame.Tools.Count
+ ", gestures: " + frame.Gestures().Count);
if (!frame.Hands.Empty)
{
// Get the first hand
Hand hand = frame.Hands[0];
// Check if the hand has any fingers
FingerList fingers = hand.Fingers;
if (!fingers.Empty)
{
// Calculate the hand's average finger tip position
Vector avgPos = fingers.Aggregate(Vector.Zero, (current, finger) => current + finger.TipPosition);
avgPos /= fingers.Count;
SafeWriteLine("Hand has " + fingers.Count + " fingers, average finger tip position: " + avgPos);
} ………
private static void Main(string[] args)
{
var listener = new SampleListener();
var controller = new Controller();
controller.AddListener(listener);
// Remove the sample listener when done
controller.RemoveListener(listener);
controller.Dispose();
}
Code – JavaScript
// Display Frame object data
var frameOutput = document.getElementById("frameData");
var frameString = "Frame ID: " + frame.id + "<br />"
+ "Timestamp: " + frame.timestamp + " &micro;s<br />"
+ "Hands: " + frame.hands.length + "<br />"
+ "Fingers: " + frame.fingers.length + "<br />"
+ "Tools: " + frame.tools.length + "<br />"
+ "Gestures: " + frame.gestures.length + "<br />";
// Frame motion factors
if (previousFrame) {
var translation = frame.translation(previousFrame);
frameString += "Translation: " + vectorToString(translation) + " mm <br />";
var rotationAxis = frame.rotationAxis(previousFrame);
var rotationAngle = frame.rotationAngle(previousFrame);
frameString += "Rotation axis: " + vectorToString(rotationAxis, 2) + "<br />";
frameString += "Rotation angle: " + rotationAngle.toFixed(2) + " radians<br />";
……
// Setup Leap loop with frame callback function
var controllerOptions = {enableGestures: true};
Leap.loop(controllerOptions, function(frame) {
// Body of callback function
})
Making sense of movement
The screen
Screen class
- contains computer screen
information
- Position, orientation & vector
Leap/PC
- Information from OS
Can be invalid
Device should to be calibrated
with the screen
The tool
• Based on:
• Length
• Shape
• Width
The gestures
• Predifined gestures:
• Circle
• Swipe
• Key Tap (downward movement)
• Screen Tap (forward movement)
Turn, twist and tilt – and fist
• Use Motion factors from frame class
• Translation,
• RotationAxis,
• RotationAngle,
• Scalefactor
UX guidelines
• Avoid complexity
• Use what is considered natural
• Think outside the box
• Positive experience for the user
• Feedback
• No clutter
• Desctructive action
• Navigation and interaction – keep them apart
Q and A
Infra red light safety concerns
• IR occours naturally in the physical world
• Widely used in a variety of devices
• No health risk found with general exposure of IR
Using Leap as a mouse out of the box
• Developer unit no, consumer unit yes
• CPU usage
• Will be lower when released
• New updates ’inactivates’ the device when not used, activated when it registers
motion
Thank you
Iris Classon

More Related Content

What's hot

What's hot (7)

What is a Wave-Physics
What is a Wave-PhysicsWhat is a Wave-Physics
What is a Wave-Physics
 
Communication in space
Communication in spaceCommunication in space
Communication in space
 
Exoplanet
Exoplanet Exoplanet
Exoplanet
 
Gravitational wave.pptx
Gravitational wave.pptxGravitational wave.pptx
Gravitational wave.pptx
 
GPS
GPSGPS
GPS
 
All about Sound and Light for Grade 7
All about Sound and Light for Grade 7All about Sound and Light for Grade 7
All about Sound and Light for Grade 7
 
[7] trim
[7] trim[7] trim
[7] trim
 

Viewers also liked

11.19 hong quan_leapmotion-beyondthemouseandkeyboard
11.19 hong quan_leapmotion-beyondthemouseandkeyboard11.19 hong quan_leapmotion-beyondthemouseandkeyboard
11.19 hong quan_leapmotion-beyondthemouseandkeyboardQuân Lê
 
A tiny device with a huge idea ''Leap Motion''
A tiny device with a huge idea ''Leap Motion''A tiny device with a huge idea ''Leap Motion''
A tiny device with a huge idea ''Leap Motion''Sazzad Saad
 
Leap Motion seminar presentation ppt
Leap Motion seminar presentation pptLeap Motion seminar presentation ppt
Leap Motion seminar presentation pptAdarsh Kottur
 
Leap Motion Basic
Leap Motion BasicLeap Motion Basic
Leap Motion Basicvelakaturi
 
Leap motion controller
Leap motion controllerLeap motion controller
Leap motion controllerRuksar Khatun
 

Viewers also liked (13)

11.19 hong quan_leapmotion-beyondthemouseandkeyboard
11.19 hong quan_leapmotion-beyondthemouseandkeyboard11.19 hong quan_leapmotion-beyondthemouseandkeyboard
11.19 hong quan_leapmotion-beyondthemouseandkeyboard
 
Leap motion
Leap motionLeap motion
Leap motion
 
A tiny device with a huge idea ''Leap Motion''
A tiny device with a huge idea ''Leap Motion''A tiny device with a huge idea ''Leap Motion''
A tiny device with a huge idea ''Leap Motion''
 
Leap motion
Leap motionLeap motion
Leap motion
 
Leap Motion - Aydin Akcasu
Leap Motion - Aydin AkcasuLeap Motion - Aydin Akcasu
Leap Motion - Aydin Akcasu
 
Leap Motion
Leap MotionLeap Motion
Leap Motion
 
Leap Motion seminar presentation ppt
Leap Motion seminar presentation pptLeap Motion seminar presentation ppt
Leap Motion seminar presentation ppt
 
Abstract leapmotion
Abstract leapmotionAbstract leapmotion
Abstract leapmotion
 
Final power point 2
Final power point 2Final power point 2
Final power point 2
 
Leap motion
Leap motionLeap motion
Leap motion
 
Leap motion
Leap motionLeap motion
Leap motion
 
Leap Motion Basic
Leap Motion BasicLeap Motion Basic
Leap Motion Basic
 
Leap motion controller
Leap motion controllerLeap motion controller
Leap motion controller
 

Similar to Developing for Leap Motion

Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5Roy Clarkson
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the futureChris Mills
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Lean IT Consulting
 
Quick look in Reactive Extensions
Quick look in Reactive ExtensionsQuick look in Reactive Extensions
Quick look in Reactive Extensionsjohnlvidal
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsChristian Heindel
 
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureIEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureSebastien Kuntz
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobXDarko Kukovec
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsSPC Adriatics
 
Web_of_Things_2013
Web_of_Things_2013Web_of_Things_2013
Web_of_Things_2013Max Kleiner
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...Javier García Magna
 
Chat+twitter app with lift
Chat+twitter app with liftChat+twitter app with lift
Chat+twitter app with liftk4200
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache UsergridDavid M. Johnson
 
Best Practices for Webcam Augmented Reality
Best Practices for Webcam Augmented RealityBest Practices for Webcam Augmented Reality
Best Practices for Webcam Augmented RealityZugara
 
Building Self-Defending Applications With OWASP AppSensor JavaOne 2016
Building Self-Defending Applications With OWASP AppSensor JavaOne 2016Building Self-Defending Applications With OWASP AppSensor JavaOne 2016
Building Self-Defending Applications With OWASP AppSensor JavaOne 2016jtmelton
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN StackTroy Miles
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator PresentationAaron Saunders
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesJinwoong Kim
 
Opencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetesOpencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetesJinwoong Kim
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileAmazon Web Services Japan
 

Similar to Developing for Leap Motion (20)

Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Html5
Html5Html5
Html5
 
APIs, now and in the future
APIs, now and in the futureAPIs, now and in the future
APIs, now and in the future
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
Quick look in Reactive Extensions
Quick look in Reactive ExtensionsQuick look in Reactive Extensions
Quick look in Reactive Extensions
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.jsAsynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
 
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architectureIEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
IEEE VR-SEARIS 2014 Keynote - MiddleVR - Philosophy and architecture
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
 
Web_of_Things_2013
Web_of_Things_2013Web_of_Things_2013
Web_of_Things_2013
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
 
Chat+twitter app with lift
Chat+twitter app with liftChat+twitter app with lift
Chat+twitter app with lift
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Best Practices for Webcam Augmented Reality
Best Practices for Webcam Augmented RealityBest Practices for Webcam Augmented Reality
Best Practices for Webcam Augmented Reality
 
Building Self-Defending Applications With OWASP AppSensor JavaOne 2016
Building Self-Defending Applications With OWASP AppSensor JavaOne 2016Building Self-Defending Applications With OWASP AppSensor JavaOne 2016
Building Self-Defending Applications With OWASP AppSensor JavaOne 2016
 
From MEAN to the MERN Stack
From MEAN to the MERN StackFrom MEAN to the MERN Stack
From MEAN to the MERN Stack
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
OpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and KubernetesOpenCensus with Prometheus and Kubernetes
OpenCensus with Prometheus and Kubernetes
 
Opencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetesOpencensus with prometheus and kubernetes
Opencensus with prometheus and kubernetes
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Developing for Leap Motion

  • 1. Taking the Leap with Leap Motion Iris Classon
  • 2. About me • Technical Evangelist at Telerik (WinRT) • Software Developer at Dotnet Mentor • Microsoft MVP C# and member of MEET • MCSD, MCPD, MCTS • Organizer Sweden Pluralsight Study Group (Gothenburg) • Started learning programming from 0 summer 2011 • Licensed clinical Dietitian and Int.Lic. Personal Trainer
  • 3. Contact details • www.irisclasson.com • Twitter • @IrisClasson • Email • Telerik – iris.classon@telerik.com • Dotnet Mentor – iris.classon@dotnetmentor.se
  • 4. What is the Leap Motion?
  • 5. To get started • Mac, Windows, Linux (latest OS – more or less) • Developer Unit of Leap Motion • Preorder or apply to get one • Purchase: release projected for 22nd of July • https://www.leapmotion.com/ • SDK • Can’t be shared • Forum, samples and documentation available • Projects on GitHub • Breaking changes introduced between SDK versions- might need to update the code
  • 6. Good to know • Still in Beta • Developer units vs. consumer units: • The size and weight • Final hardware components & casing • Field of view approx 20% wider in consume version
  • 7. Do not forget • Dispose Frame object when done with it • RemoveListener from Controller when app closes • Dispose Controller afterwards • Add Leap.DLL, LeapCSHarp.DLL & LeapCSHarp.NET4.0.DLL • Set copy output to Copy Always • Reference the LeapCSHarp.NET4.0.DLL
  • 8. When in trouble w. the device • USB-cable has been known to cause trouble • Change USB port and/or cable • Connect the Leap before running the executable • Make sure there is light and the device is clean • Calibrate screen • Use the Leap Vizualiser to check if it works
  • 9. The Leap story • Small startup based in San Fransisco • Venture capital • Has grown from just a few people to 80 employees and still hiring • Asus and HP on board • 40 000 Devs signed up • 12 000 dev units shipped so far • Still shipping
  • 10. Demo
  • 11. The Airspace Store • Storefront to gather all the apps • Dev decides on pricing, distribution & platform supported • Non-exclusive distribution • Min price starts at jus below 1 USD • Industry standard at 70% to the developer • Apps manually tested before publishing
  • 12. Available languages • C++ • C# • Objective C • Java • Python • JavaScript • (Ruby => hack)
  • 13. How the API works • Leap motion detects fingers/tools • Data captured as frames continously • Listener class handles events from the Frame class • Controller is the connection between device and app • To listen for the updates on the Frame data: controller.AddListener(listener) • Gestures must be enabled through the controller controller.EnableGesture(Gesture.GestureType.TYPESWIPE)
  • 15. Code – C# class SampleListener : Listener public override void OnFrame(Controller controller) { // Get the most recent frame and report some basic information Frame frame = controller.Frame(); SafeWriteLine("Frame id: " + frame.Id + ", timestamp: " + frame.Timestamp + ", hands: " + frame.Hands.Count + ", fingers: " + frame.Fingers.Count + ", tools: " + frame.Tools.Count + ", gestures: " + frame.Gestures().Count); if (!frame.Hands.Empty) { // Get the first hand Hand hand = frame.Hands[0]; // Check if the hand has any fingers FingerList fingers = hand.Fingers; if (!fingers.Empty) { // Calculate the hand's average finger tip position Vector avgPos = fingers.Aggregate(Vector.Zero, (current, finger) => current + finger.TipPosition); avgPos /= fingers.Count; SafeWriteLine("Hand has " + fingers.Count + " fingers, average finger tip position: " + avgPos); } ……… private static void Main(string[] args) { var listener = new SampleListener(); var controller = new Controller(); controller.AddListener(listener); // Remove the sample listener when done controller.RemoveListener(listener); controller.Dispose(); }
  • 16. Code – JavaScript // Display Frame object data var frameOutput = document.getElementById("frameData"); var frameString = "Frame ID: " + frame.id + "<br />" + "Timestamp: " + frame.timestamp + " &micro;s<br />" + "Hands: " + frame.hands.length + "<br />" + "Fingers: " + frame.fingers.length + "<br />" + "Tools: " + frame.tools.length + "<br />" + "Gestures: " + frame.gestures.length + "<br />"; // Frame motion factors if (previousFrame) { var translation = frame.translation(previousFrame); frameString += "Translation: " + vectorToString(translation) + " mm <br />"; var rotationAxis = frame.rotationAxis(previousFrame); var rotationAngle = frame.rotationAngle(previousFrame); frameString += "Rotation axis: " + vectorToString(rotationAxis, 2) + "<br />"; frameString += "Rotation angle: " + rotationAngle.toFixed(2) + " radians<br />"; …… // Setup Leap loop with frame callback function var controllerOptions = {enableGestures: true}; Leap.loop(controllerOptions, function(frame) { // Body of callback function })
  • 17. Making sense of movement
  • 18. The screen Screen class - contains computer screen information - Position, orientation & vector Leap/PC - Information from OS Can be invalid Device should to be calibrated with the screen
  • 19. The tool • Based on: • Length • Shape • Width
  • 20. The gestures • Predifined gestures: • Circle • Swipe • Key Tap (downward movement) • Screen Tap (forward movement) Turn, twist and tilt – and fist • Use Motion factors from frame class • Translation, • RotationAxis, • RotationAngle, • Scalefactor
  • 21. UX guidelines • Avoid complexity • Use what is considered natural • Think outside the box • Positive experience for the user • Feedback • No clutter • Desctructive action • Navigation and interaction – keep them apart
  • 22. Q and A Infra red light safety concerns • IR occours naturally in the physical world • Widely used in a variety of devices • No health risk found with general exposure of IR Using Leap as a mouse out of the box • Developer unit no, consumer unit yes • CPU usage • Will be lower when released • New updates ’inactivates’ the device when not used, activated when it registers motion