Experiments with the Leap Motion API for Python
A collection of experiments with the Leap Motion Controller to use it as a gesture based input device for Windows and a rudimentary 3D scanner
pip install -r "requirements.txt"
lib
folder to site-packages
Demo
cd
to the LeapMouse
folderpython LeapMouse.py
Note: LeapMouse.py works only with Windows
cd
to 3D-Scanning
and run python image_correction.py
to see a point cloud generated by OpenCV's stereoscopic 3D reconstruction routines. I've used PyQtGraph to render the cloud as Matplotlib was really slow for plotting 640 * 240 points in 3D space. You can read more about 3D reconstruction using OpenCV here
camera_constants.py
contains the required camera calibration parameters like the intrinsic/extrinsic and reprojection matrices. This is an excellent source on camera models and calibration. The calibrated parameters aren't optimal so the point cloud has quite a bit of noise. I've had to make do with some of the calibrated parameters I found here
Point cloud of my hand
fingertip and palm coordinates from plot_fingers.py
a 3D scan of a coffee cup
All contributions are welcome, especially for improving the camera calibration