Coder Social home page Coder Social logo

matleap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

matleap's Issues

Leap 2.0 SDK Skeletal Tracking Model Potentially Breaks Matleap App Logic

The Leap 2.0 skeletal tracking model provides a function, isExtended(), that indicates if a finger is extended or not. This means that the version 2.0 SDK will always return five pointables for each hand.

The 1.0 SDK did not return a pointable for fingers that were not extended. Therefore, applications will break if they assume that the presence of a pointable implies that it is extended.

Test lagging

Hello Jef,
I need your help please. I'm planning to do research related to sign language using LMC. I bought one from Amazon and I'm trying to interface it with Matlab. Fortunately, you've done a wonderful job and published it on GitHub. I followed the steps you mentioned and the build section was passed successfully. Unfortunately, Matlab is lagging when I run the testing section ( >> test_matleap).
I didn't change the codes except for the word "Sleep" I changed it to "sleep" and then the build has done successfully.
I debugged the function and I think it stops in v=matleap(0); which is the third statement in matleap_version.
I use MATLAB vR2020a and C++ compiler of Microsoft visual C++ 6.0.
Thanks in advance.

Connection problem [solved]

Hello all

Noob here! So probably a noob question...
I downloaded the last SDK and I would like to play with Leap on Matlab.
I followed the instructions.
The build.m works perfectly. But the rest I have the following error:

test_matleap
Invalid MEX-file 'C:\Users\PedroMiguelPires\Desktop\matleap-master\matleap-master\matleap.mexw64': The specified module could not be found.

Error in matleap_version (line 3)
v=matleap(0);

Error in test_matleap (line 13)
[version]=matleap_version;

Any idea???

Camera Image Capture Enhancement

The Leap SDK has support for capturing raw camera images. It would be nice to add this support to Matleap. This features has been requested by several people.

Matlab 14b + Leap SDK 2.2.0 segfaults on Fedora 20

>> matleap(0)
Unexpected unknown exception from MEX file..
MATLAB crash file:[$HOME]/matlab_crash_dump.32444-1:

   Segmentation violation detected at Sun Nov 30 19:27:10 2014

Configuration:
Crash Decoding : Disabled
Current Visual : None
Default Encoding : UTF-8
GNU C Library : 2.18 stable
MATLAB Architecture: glnxa64
MATLAB Root : [$HOME]/MATLAB/R2014b
MATLAB Version : 8.4.0.150421 (R2014b)
Operating System : Linux 3.17.3-200.fc20.x86_64 #1 SMP Fri Nov 14 19:45:42 UTC 2014 x86_64
Processor ID : x86 Family 6 Model 23 Stepping 6, GenuineIntel
Software OpenGL : 0
Virtual Machine : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : No active display

Fault Count: 1

Abnormal termination:
Segmentation violation

pointables are not available

after execution of the testmatleap.m pontables and the other data like velocity, finger are not getting.. please give us the codes, we are very beginners in the matlab.

Matlab doesnt respond in Windows

I compiled correctly the code with build.m and with my leap device connected I run matleap(0) but then MatLab doesnt respond even after Ctrl + C.

I am running Windows 8.1 and Matlab R2013a, my version of the Leap SDK is 1.0.8+7665.

Thank you,

Building .mex file fails for SDK 2.2.0 on Linux

I'm using the Leap SDK 2.2.0+23475 on Linux (Fedora 20, x86_64) with Matlab 2014b and get the following error when trying to compile the mex file:

>> build
Compiling matleap.cpp
Evaluating "mex -I./LeapSDK/include -L./LeapSDK/lib/x64 -lLeap matleap.cpp"
Building with 'g++'.
Warning: You are using gcc version '4.8.3-7)'. The version of gcc is not supported. The version currently supported with MEX
is '4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release. 
> In build at 37 
Warning: You are using gcc version '4.8.3'. The version of gcc is not supported. The version currently supported with MEX is
'4.7.x'. For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release. 
> In build at 37 
Error using mex
[$HOME]/leapmotion/matleap/matleap.cpp: In function ‘void mexFunction(int, mxArray**,
int, const mxArray**)’:
[$HOME]/leapmotion/matleap/matleap.cpp:164:69: error: invalid conversion from ‘int’ to
‘mxComplexity’ [-fpermissive]
         plhs[0] = mxCreateNumericMatrix (1, 2, mxDOUBLE_CLASS, 0);
                                                    n                 ^
In file included from [$HOME]/MATLAB/R2014b/extern/include/mex.h:57:0,
                 from [$HOME]/leapmotion/matleap/matleap.h:14,
                 from [$HOME]/leapmotion/matleap/matleap.cpp:7:
[$HOME]/MATLAB/R2014b/extern/include/matrix.h:780:21: error:   initializing argument 4 of
‘mxArray* mxCreateNumericMatrix_700(int, int, mxClassID, mxComplexity)’ [-fpermissive]
 LIBMMWMATRIX_PUBLISHED_API_EXTERN_C mxArray *mxCreateNumericMatrix_700(int m, int n, mxClassID classid, mxComplexity flag);
                     ^


Error in build (line 37)
eval(cmd)

I don't think the gcc version causes this, other C/C++ code runs fine with Matlab.

Cheers,
Sam

"collect2.exe: error: ld returned 1 exit status Error in build (line 37) eval(cmd)"

Hello,

Sorry if my issue seems noob-ish, I keep stumbling upon these errors when I try to build matleap on MATLAB r2016a :

Trial>> build
Compiling matleap.cpp
Evaluating "mex -compatibleArrayDims -I./LeapSDK/include -L./LeapSDK/lib/x86 -lLeap matleap.cpp"
Building with 'MinGW64 Compiler (C++)'.
Error using mex
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.lib when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.dll when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.lib when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86/Leap.dll when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible ./LeapSDK/lib/x86\Leap.lib when searching for -lLeap
C:/MATLAB/SupportPackages/R2016a_1/MW_MinGW_4_9/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find -lLeap
collect2.exe: error: ld returned 1 exit status


Error in build (line 37)
eval(cmd)

image

I tried fiddling with the parameters of the mex function and checking for differences between the current leap SDK and your program, but I can't seem to find anything wrong.

I tried both libs, x64 and x86. I'm on Win10 and use the Mingw64 c++ compiler v4.9.
The includes and paths are correct, and the Leap SDK is in version 2.3.1.31549.
I have checked if Leap.lib exists in both x64 and x86 folders and it's there.

Would you have any clue I'm missing by any chance ? That would be greatly appreciated. And kudos for your work.

mxCreateNumericMatrix error on Windows

mxCreateNumericMatrix says "cannot convert parameter 4 from 'int' to 'mxComplexity'" when compiling under Windows, C++ version 7.1. The reported error line number does not correspond to line numbers in the matleap.cpp source code.

Lots of warning are also issued for argument conversions to int. Line numbers are also misaligned.

These errors/warnings do not occur on Mac or Linux.

Build error

I'm trying to build the MEX, but I get the error:

Error using mex
C:\Users\UTENTE\Dropbox\LAVORO\Articoli\AutomaticPC_AlignmentRealSense\LeapMotion\matleap-master\matleap-master\LeapConnection.cpp: In function 'void millisleep(int)':
C:\Users\UTENTE\Dropbox\LAVORO\Articoli\AutomaticPC_AlignmentRealSense\LeapMotion\matleap-master\matleap-master\LeapConnection.cpp:300:20: error: 'Sleep' was not declared in this
scope
Sleep(milliseconds);
^

Error in build (line 37)
eval(cmd)

How can I solve the issue?

Poll isConnected routine during initialization.

When the controller is initialized, the function isConnected() should be polled at, say, 100ms intervals until it returns true. This will prevent users from having to call sleep() before the first call to matleap_frame().

hi

how to solve this ,

build
Compiling matleap.cpp
Evaluating "mex -I./LeapSDK/include -L./LeapSDK/lib/x64 -lLeap matleap.cpp"
Building with 'Microsoft Visual C++ 2008'.
Error using mex
LINK : fatal error LNK1104: cannot open file 'matleap.mexw64'
Error in build (line 37)
eval(cmd)

How to start build the mex file

Hi,

I'm novel with c++ and mex file so I would like to have more detailed information about the initial step of this tool. I don't understand how to compile the mex in the compiler, thank you.

how to access fingertip position

Hello! I am trying to expand upon your matleap code (it was incredibly useful, and a great repo!), by getting the LeapMotion sensor to provide me with fingertip position data. I have not been able to achieve successful results, and I was wondering if you had any insight? I realize that I would need to alter the matleap.cpp mex file in C++ in order to add this new functionality, but am unsure how to go about it. I don't have C++ knowledge, so I was wondering if I could get help with this task. Thanks again.

Build error

Hello,
I can't build the new matleap.cpp (changed 15 days ago). I get the following errors:

image

image

There are many many lines of errors like the above.

Is it possible to upload the compiled matleap.mexw64? I have had trouble with this for some time and can't figure out why the build fails.

Thanks,
Eric

Missing Compiler in my local system

untitled

As you can see in the above image, My mex command keeps giving me this "Compiler not found error".
I have Windows 8.1 OS(64 bit). I have MAATLABR2013a installed. I guess its also 32 bit.

I had previously asked you about this, You wanted me to install a C++ compiler in my computer.
In order to do that I downloaded and installed Microsoft Visual Studio Professional 2013 32-bit (English) in my 64 bit system. But still i keep getting the same error.

Please help me find the perfect solution to install a C++ compiler in my system that the 'mex' command can access and use.

Thanks.

build error

hi
i installed visual studio 2017, MATLAB 2017a on windows 10. when I run build.m i get this error:
how can i fix it? thank you very much
Error using mex
MEX cannot find library 'Leap' specified with the -l option.
MEX looks for a file with one of the names:
Leap.lib
libLeap.lib
Please specify the path to this library with the -L option.

Error in build (line 37)
eval(cmd)

Tool tracking

Hi,

I have finished building a project with your code. Thanks a lot. Please find below the video link for the completed project.
https://www.youtube.com/watch?v=A1MbZQKPmUU

The thing is i am trying the build another similar project but with tool tracking. Your code works fine for tools also. I am getting values in the matleap_frame thing. I was just wondering which end of the tool does this function return? I couldnt figure that out. Can you please clarify that for me. I need to know what exactly does the positional values from the matleap_frame data represent with respect to the tool? The leading tip or the trailing tip? Or a midpoint of those two?

Thanks in advance

Matlab crashing when running test_matleap.m

Hello @jeffsp and @ofloveandhate ,

Thank you for sharing this code!
I am trying to run Matleap on a Windows10 system, with R2022b and MinGW-64 6.3. LeapMotion version is ultraleap-hand-tracking_v5.17.1-2023.11.16_windows.
After I copied the Leap.dll to the same directory as the mex-file, I ran the test_matleap file, and everytime Matlap stops working after
INIT STARTEDmatleap version 4.0

I tried this with multiple computers and the crashing problems were the same across them. The other version of matleap, the matleap_mater, had the same issue.

Could you please help me with this problem? Please let me know if you would need more information.

Crash with 'MinGW64 Compiler (C++)' and New SDK

I have been trying to build the mex-file on Windows 10 with the free MinGW64 Compiler (C++)' and using he latest LeapMotion SDK and keep getting the errors:
"
Error using mex
C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x251): undefined reference to Leap::Controller::frame(int) const' C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x259): undefined reference to Leap::Frame::id() const'
C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x27d): undefined reference to Leap::Frame::timestamp() const' C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x294): undefined reference to Leap::Frame::pointables() const'
C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x2a7): undefined reference to Leap::Interface::operator=(Leap::Interface const&)' C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x2c1): undefined reference to Leap::Interface::~Interface()'
C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x2d4): undefined reference to Leap::Frame::hands() const' C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x2eb): undefined reference to Leap::Interface::operator=(Leap::Interface const&)'
C:\Users\Bashar\AppData\Local\Temp\mex_2650139456171101_3344\matleap.obj:matleap.cpp:(.text+0x305): undefined reference to `Leap::Interface::~Interface()'
.
.
"

I would greatly appreciate any advise on how to fix this issue (is it an SDK compatibility issue, if so which SDK version do you recommend as I tried various SDK versions).

does not detect all the fingers

Dear Jeff.
You could explain to me what the apparent cause may be so that it does not recognize all my fingers.
I graph the positions and I have data from the index and ring fingers

Step by step tutorial

I downloaded Matlab R2016a because it is compatibile with the compiler Microsoft Visual Studio Professional C++ 2010 (C).

I used Leap Motion Orion V3 and copied the file Leap.dll inside the same folder of test_matleap.m (as written in the GitHub page).

My pc is running Windows 10.

Useful link

Step by step tutorial

  1. https://visualstudio.microsoft.com/it/vs/older-downloads/ dowload Visual Studio 2010 Professional: during the installation select ONLY "Components for c++"
  2. https://developer.leapmotion.com/releases/leap-motion-orion-321-39frn-3b659 Download Leap Motion V3 and download it
  3. https://it.mathworks.com/downloads/web_downloads select R2016 to download that version of MatLab
  4. Open Matlab, with the command mex -setup c++ check if Matlab uses the same compiler as Visual Studio 2010
  5. Copy the folder LeapSDK from the website to the same folder of the project and copy Leap.dll from \matleap-master\LeapSDK\lib\x64 to matleap-master
  6. In Matlab go to matleap-master, right click on the folder LeapSDK, select "Add to path" and then "Select Folders and subfolers"
  7. Run build command
  8. Run test_matleap command with the Leap Motion plugged in

Problem of drawing 2 hands in matleap

Hello.
I want to draw 2 hands in 1 coordination, I use Draw_Leap, but It just appears the fingers of 1 hand. Although the result shows the number of frame hands is 2 but the fingers just only 5. Below is the picture when I get this problem
1
2

How can I solve this problem?
Thank you

0 frames

capture

Anyone know why my code not get the position from leap like in example?

hand info for pointable data

First - thanks for the great interface!!

I have a task where I am looking to track both index fingers while patients perform a reaching task. Before I was using the palm location and I was able to get information about both hands - but with the pointable data it looks like it does not have information about which hand the points (fingers) are coming from.

I gather that I need to change the cpp file in order to include this hand information - could you give me any advice on how to go about doing this?

Thanks very much for your help!

Christina

Crash on MATLAB 2017a

Hey there,
Really nice work!
Although, it crashes often when I run the test function.
Windows 10, Matlab 2017a.
Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.