leap-motion

Draw a circle around cursor (C#)

老子叫甜甜 提交于 2021-01-27 19:20:17
问题 using C#; I'm trying to make an application using a Leap Motion sensor to map finger movements to cursor movement. On the screen, I would like to draw a circle around the cursor. After some searching I found someone trying to do the same thing (Leap Motion excluded) Want a drawn circle to follow my mouse in C#. The code presented there: private void drawCircle(int x, int y) { Pen skyBluePen = new Pen(Brushes.DeepSkyBlue); Graphics graphics = CreateGraphics(); graphics.DrawEllipse( skyBluePen,

Save tracking data from Leap Motion with p5.js to .csv

匆匆过客 提交于 2020-01-05 04:20:11
问题 I need to write a script in p5.js to track the position of the five fingertips (on one or both hands) at a set interval (e.g. 20 ms), and then save the time-finger data to a .csv I have previously done this in Processing with Table and getting the PVector for the fingers, but I have no idea on how to do this with javascript. Any and all input would be greatly appreciated! 回答1: Stack Overflow isn't really designed for general "how do I do this" type questions. It's for specific "I tried X,

Static Object in Scene - Three.js

ⅰ亾dé卋堺 提交于 2019-12-17 16:39:13
问题 I have two objects in my scene. I am using the <script src="js/controls/LeapTrackballControls.js" ></script> for moving the camera, so it feels like the objects is rotating according to the movement of my hand. The problem is that the other object is also moving, and I want it to remain always in front of me. I mean, that even if the camera moves, the object always is in the same place inside the canvas/explorer. Sorry if I'm not explaining myself properly. Any help is appreciated. EDIT: var

Leap doesn't seem to update when wpf window isn't active

对着背影说爱祢 提交于 2019-12-13 05:53:11
问题 I am trying to use output from the leap in WPF. However whenever I unfocus the window (for instance by pressing alt+tab), the leap stops giving output. So my question is, how to make sure the leap will output even when focused on a second application? 回答1: You just need to set the Leap Motion API background frames policy. controller.SetPolicy(Controller.PolicyFlag.POLICY_BACKGROUND_FRAMES); 回答2: WPF won't listen to any events outside its window. You have to explicitly set it up by yourself to

missed tap gestures from leap motion in java

拟墨画扇 提交于 2019-12-13 02:03:20
问题 I wrote a test code to see if my tap gestures are accepted from leap motion. After running the code I noticed that I have to tap really aggressively and even then, I only get a tap received once in every few taps. How can I change my code to prevent this ? (Please notice, I am very new to coding so plz be elaborate, thanks) FILE #1 package com.leaptoarduino; import com.leapmotion.leap.Controller; import com.leapmotion.leap.Gesture; public class Leapd { //Main public static final void main

Leap Listener controller stops working after some time in VS2012

天涯浪子 提交于 2019-12-11 19:32:54
问题 We have integrated flash game (crazytaxi.swf) inside Windows form application in VS Express 2012 for Windows Desktop.We are controlling game with the help of gestures using leapmotion controller. What happens is when we run project in VS2012,game starts normally.We play game using gesture (left,right etc.).But after some time controller stops listening by exiting its thread.We can see that in output window. "The thread '' (0x1b50) has exited with code 0 (0x0)." this we get in output window.

Unity3D Leap Motion - Put hand in static pose (Pose done just can't rotate)

时光怂恿深爱的人放手 提交于 2019-12-11 16:39:33
问题 I am trying to set the hand into one of a series of poses. I have created a script that captures a frame, serializes the left hand which is then stored as an xml for loading. I currently have the system setting the hand to the correct pose by calculating the offset between the palm position in the live data and that of the stored pose. The problem I am having is getting the hand to rotate. The 'hand' parameter is the current hand from the live data and the 'pose' parameter is the hand that

Leap Motion - Angle of proximal bone to metacarpal (side to side movement)

无人久伴 提交于 2019-12-11 12:02:34
问题 I am trying to get the angle between the bones, such as the metacarpal bone and the proximal bone (angle of moving the finger side to side, for example the angle when your index finger is as close to your thumb as you can move it and then the angle when your index finger is as close to your middle finger as you can move it). I have tried using Vector3.Angle with the direction of the bones but that doesn't work as it includes the bending of the finger, so if the hand is in a fist it gives a

Erasing drawn objects on Desktop using Pinvoke on C# WPF

橙三吉。 提交于 2019-12-11 08:48:10
问题 I'm trying to create an interface program for the https://www.leapmotion.com device which requires the use of multiple desktop cursors. Since windows doesn't allow multiple cursors, my first task is to create a visual cursor that can be moved around the desktop and other windows. The way I'm doing it now is to implement a loop and continuously draw the cursor object while clearing it. The drawing part works fine but I have problems doing the clearing part. I've tried using RedrawWindow() in

Overlapping components in JPanel

廉价感情. 提交于 2019-12-10 23:29:05
问题 I have a JButton and a Point (it's motion controlled by leap motion) on the same JPanel. However, they are overlapping with JButton on top. Is there a way to have my Point always on top in the JPanel application window? Here's a code snippet: public leapPanel() { setLayout(null); //18-12-13 setBackground(Color.WHITE); setVisible(true); //18-12-13 button = new JButton(); button.setBounds(100, 150, 100, 100); button.setBackground(Color.BLACK); add(button); points[nPoints] = new Point(PWIDTH/2,