SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Multi-Region Cassandra Clusters
Multi-Region Cassandra ClustersMulti-Region Cassandra Clusters
Multi-Region Cassandra ClustersInstaclustr
 
From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingThe Linux Foundation
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsBen Mildren
 
Hardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelHardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelKernel TLV
 
Raidz on-disk format vs. small blocks
Raidz on-disk format vs. small blocksRaidz on-disk format vs. small blocks
Raidz on-disk format vs. small blocksJoyent
 
Integration testing with spring @snow one
Integration testing with spring @snow oneIntegration testing with spring @snow one
Integration testing with spring @snow oneVictor Rentea
 
Exploring the Implication of ChatGPT AI for Business: Efficiency and Challenges
Exploring the Implication of ChatGPT AI for Business:  Efficiency and ChallengesExploring the Implication of ChatGPT AI for Business:  Efficiency and Challenges
Exploring the Implication of ChatGPT AI for Business: Efficiency and ChallengesMd Arman
 
High Availability in 37 Easy Steps
High Availability in 37 Easy StepsHigh Availability in 37 Easy Steps
High Availability in 37 Easy StepsTim Serong
 
Building Sustainable Metaverse Infrastructure Webinar
Building Sustainable Metaverse Infrastructure WebinarBuilding Sustainable Metaverse Infrastructure Webinar
Building Sustainable Metaverse Infrastructure WebinarAlex G. Lee, Ph.D. Esq. CLP
 
DPDK IPSec performance benchmark ~ Georgii Tkachuk
DPDK IPSec performance benchmark ~ Georgii TkachukDPDK IPSec performance benchmark ~ Georgii Tkachuk
DPDK IPSec performance benchmark ~ Georgii TkachukIntel
 

Tendances (13)

Multi-Region Cassandra Clusters
Multi-Region Cassandra ClustersMulti-Region Cassandra Clusters
Multi-Region Cassandra Clusters
 
From printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debuggingFrom printk to QEMU: Xen/Linux Kernel debugging
From printk to QEMU: Xen/Linux Kernel debugging
 
Monitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstatsMonitoring IO performance with iostat and pt-diskstats
Monitoring IO performance with iostat and pt-diskstats
 
Hardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelHardware Probing in the Linux Kernel
Hardware Probing in the Linux Kernel
 
Project Request Form
Project Request FormProject Request Form
Project Request Form
 
Raidz on-disk format vs. small blocks
Raidz on-disk format vs. small blocksRaidz on-disk format vs. small blocks
Raidz on-disk format vs. small blocks
 
Integration testing with spring @snow one
Integration testing with spring @snow oneIntegration testing with spring @snow one
Integration testing with spring @snow one
 
Exploring the Implication of ChatGPT AI for Business: Efficiency and Challenges
Exploring the Implication of ChatGPT AI for Business:  Efficiency and ChallengesExploring the Implication of ChatGPT AI for Business:  Efficiency and Challenges
Exploring the Implication of ChatGPT AI for Business: Efficiency and Challenges
 
High Availability in 37 Easy Steps
High Availability in 37 Easy StepsHigh Availability in 37 Easy Steps
High Availability in 37 Easy Steps
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Building Sustainable Metaverse Infrastructure Webinar
Building Sustainable Metaverse Infrastructure WebinarBuilding Sustainable Metaverse Infrastructure Webinar
Building Sustainable Metaverse Infrastructure Webinar
 
DPDK IPSec performance benchmark ~ Georgii Tkachuk
DPDK IPSec performance benchmark ~ Georgii TkachukDPDK IPSec performance benchmark ~ Georgii Tkachuk
DPDK IPSec performance benchmark ~ Georgii Tkachuk
 
eBPF/XDP
eBPF/XDP eBPF/XDP
eBPF/XDP
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Dernier (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

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