Skip to content

Software Setup Guide

John De Witt edited this page Mar 30, 2018 · 1 revision

Raspberry Pi software setup

This project has dependencies. Let's install them all!

  1. sudo apt-get install git g++ pkg-config cmake libjpeg8-dev libusb-dev libsdl2-dev liblo-dev freeglut3-dev

  2. sudo apt-get install libopencv-dev python-opencv

  3. sudo apt-get install libpcl-dev

For mjpg-streamer:

  1. cd ~

  2. git clone https://github.com/jacksonliam/mjpg-streamer.git

  3. cd mjpg-streamer-experimental

  4. make

  5. sudo make install

  6. cd ~

Next up, python dependency for slcapture.py:

  1. git clone https://github.com/ptone/pyosc

  2. cd pyosc

  3. sudo ./setup.py install

Now for SLTK:

  1. cd ~

  2. git clone https://github.com/jhdewitt/sltk.git

  3. cd sltk

  4. make

with this, the project should be compiled and ready for running

To compile only one tool at a time, e.g. slcrunch or slcalibrate:

  • make slcrunch
  • make slcalibrate

Running the programs

Camera program (mjpg-streamer)

Here are two example invocations of mjpg-streamer.

This one is for streaming from raspberry CSI interface; it sets color gain to be fixed so colors will be uniform:

mjpg_streamer -o "output_http.so -w ./www" -i "input_raspicam.so -quality 100 -x $X_RES -y $Y_RES -fps $FPS -ISO 100 -awb off -ex off --awbgainR $RED_GAIN --awbgainB $BLU_GAIN -timestamp -shutter $EXPOSURE_TIME"

This one is for streaming from a USB UVC camera.

sudo ./mjpg_streamer -timestamp -i "./input_uvc.so" -o "./output_http.so"

Control GUI

Control of slcapture.py is done through a GUI that sends OSC packets to request structured light sequences.

Install Processing https://processing.org/download/

Copy slcontrol folder to Processing programs folder, or open it in place and Processing should ask you to move it.

slcontrol example gui

Assuming all the above commands run without error, ~/sltk/bin/ should now contain the binaries for all SLTK programs.