Skip to content

Instantly share code, notes, and snippets.

@theleoborges
Forked from gabriel/DepthJS setup
Created April 29, 2012 11:41
Show Gist options
  • Select an option

  • Save theleoborges/2549670 to your computer and use it in GitHub Desktop.

Select an option

Save theleoborges/2549670 to your computer and use it in GitHub Desktop.

Revisions

  1. theleoborges revised this gist Apr 29, 2012. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion DepthJS setup
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@

    # Install ZeroMQ
    sudo brew install zmq
    easy_install pyzmq
  2. @gabriel gabriel created this gist Jan 12, 2011.
    68 changes: 68 additions & 0 deletions DepthJS setup
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,68 @@

    # Install ZeroMQ
    sudo brew install zmq
    easy_install pyzmq

    [0] http://www.zeromq.org/bindings:python

    # Install OpenCV
    sudo brew install opencv

    # Install libusb
    sudo brew install libusb

    # Install libfreenect

    cd /usr/local/Library/Formula
    sudo curl --insecure -O "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libfreenect.rb"
    sudo curl --insecure -O "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libusb-freenect.rb"

    sudo brew install libfreenect

    [0] http://openkinect.org/wiki/Getting_Started#Get_the_formulas


    # Fix libJPEG:

    dyld: Symbol not found: __cg_jpeg_resync_to_restart
    Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    Expected in: /usr/local/lib/libJPEG.dylib
    in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    Trace/BPT trap

    sudo cp /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libJPEG.dylib /usr/local/lib/libJPEG.dylib


    # Fix libTIFF

    dyld: Symbol not found: __cg_TIFFClientOpen
    Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
    Expected in: /usr/local/lib/libTIFF.dylib
    in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
    Trace/BPT trap

    sudo cp /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libTIFF.dylib /usr/local/lib/


    # Build ocv_freenect

    cd depthjs/cv
    make

    # Install DepthJS chrome extension

    Type chrome://extensions, expand Developer mode click “Load unpacked extension” and select the "depthjs/chrome-extension" folder.

    # Start the backend

    Tornado/ZMQ backend:

    python depthjs/backend/backend.py

    OpenCV/Freenect:

    ./depthjs/cv/ocv_freenect

    # Load the extension

    In chrome://extensions/, select the background.html link in the DepthJS section. Select the Javascript console, you should see events streaming in.