Giter VIP home page Giter VIP logo

libfreenect-goodies's Introduction

This is a grand unifying demo of the python scientific computing environments. It lets you tinker with kinect data in OpenCV, OpenGL, and Matplotlib, all at the same time!

Installation

  1. You need to have installed: IPython, Matplotlib, OpenCV 2.1, PyOpengl, wxPython

  2. Build the latest version of libfreenect. https://github.com/openkinect/libfreenect

  3. Build and install the python wrappers for libfreenect cd libfreenect/wrappers/python python setup.py install

  4. Download the latest version of this project git clone https://github.com/amiller/libfreenect-goodies.git cd pykinect

  5. Test that python can find libfreenect by running: python demo_freenect.py

Usage instructions

  1. Please run this script using: ipython -pylab -wthread demo_pykinect.py

  2. You should see an opengl window pop up with a preview of a point cloud. You can pan and zoom with the mouse. Run the following commands: update() # Grabs one frame from kinect and updates the point cloud update_on() # Grabs frames from kinect on a thread - 3d Video! (might be slow!) update_off() # Stops the update thread

  3. You can also use opencv: loopcv() # Grab frames and display them as a cv image (ctrl+c to break)

  4. You can also use matplotlib: imshow(depth)

  5. Most importantly, you can reload any of the code without pausing or destroying your python instance: %run -i demo_pykinect.py

Try changing some of the code, like the downsampling factor (search: downsampling) or the point size (search: GL_POINT_SIZE) and update the code without quitting python.

This is an ideal environment for developing 3D point cloud algorithms and visualizations. All of your tools are right at hand.

Note to MATLAB users: Yes, MATLAB already does most of this... there are plenty of reasons to prefer python, one of which is access to OpenGL drawing commands - scatter3 isn't adequate!

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.