Skip to content

Instantly share code, notes, and snippets.

View mkassner's full-sized avatar

Moritz Kassner mkassner

View GitHub Profile
# -*- coding: utf-8 -*-
# Author: Douglas Creager <[email protected]>
# This file is placed into the public domain.
# Calculates the current version number. If possible, this is the
# output of “git describe”, modified to conform to the versioning
# scheme that setuptools uses. If “git describe” returns an error
# (most likely because we're in an unpacked copy of a release tarball,
# rather than in a git working copy), then we fall back on reading the
# contents of the RELEASE-VERSION file.
@mkassner
mkassner / opencv.rb
Last active December 31, 2015 17:38
require 'formula'
class Opencv < Formula
homepage 'http://opencv.org/'
url 'https://github.com/mkassner/opencv/archive/2.4.8.2.tar.gz'
sha1 '5a23ad0c587d6a7fe00d79dfdea0199d7c584923'
option '32-bit'
option 'with-qt', 'Build the Qt4 backend to HighGUI'
option 'with-tbb', 'Enable parallel code in OpenCV using Intel TBB'
require 'formula'
class Opencv < Formula
homepage 'http://opencv.org/'
url 'https://github.com/Itseez/opencv/archive/2.4.7.1.tar.gz'
sha1 'b6b0dd72356822a482ca3a27a7a88145aca6f34c'
option '32-bit'
option 'with-qt', 'Build the Qt4 backend to HighGUI'
option 'with-tbb', 'Enable parallel code in OpenCV using Intel TBB'
@mkassner
mkassner / osc_test_server.py
Created March 21, 2014 08:47
Pupil_OSC_bridge
'''
simple python osc test server that will print pupil/norm_pos mssages
installing pyOSC:
git clone git://gitorious.org/pyosc/devel.git pyosc
cd pyosc
python setup.py install (may need sudo)
'''
'''
a script that will replay pupil server messages to serial.
as implemented here only the pupil_norm_pos is relayed.
implementeing other messages to be send as well is a matter of renaming the vaiables.
'''
#zmq setup
@mkassner
mkassner / mjepg_bandwidth.patch
Last active August 29, 2015 13:58
v4l2 driver patch
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 6a4b0b8..e5e63b2 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -36,6 +36,7 @@ unsigned int uvc_no_drop_param;
static unsigned int uvc_quirks_param = -1;
unsigned int uvc_trace_param;
unsigned int uvc_timeout_param = UVC_CTRL_STREAMING_TIMEOUT;
+unsigned int uvc_jpeg_comp_param;
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev yasm
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.9"
mkdir OpenCV
cd OpenCV
echo "Installing Dependenices"
@mkassner
mkassner / README.md
Last active August 29, 2015 14:06
pupil remote scripts

Pupil Remote

This collection of scripts emulates a toolchain where:

  • a UDP signal is used to broadcast the beginning of a recording. - udp_broadcast_server.py
  • a bridge script relays the information using 0MQ. - udp_serial_bridge.py
  • Pupil Capture Plugin Pupil_Remote will start the appropriate fn in Capture.

Pupil Remote can be emulated with test_zmq_server.py

@mkassner
mkassner / check_min_dist.py
Created November 6, 2015 13:16
Rhino Mesh intersection checks
# imports need to be cleaned up
import rhinoscript.userinterface
from rhinoscript import geometry
import rhinoscriptsyntax as rs
import System,Rhino
from time import sleep
import os
from Rhino.DocObjects import *
import scriptcontext