Skip to content

Instantly share code, notes, and snippets.

View mkassner's full-sized avatar

Moritz Kassner mkassner

View GitHub Profile
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;
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
# -*- coding: utf-8 -*-
# Author: Douglas Creager <dcreager@dcreager.net>
# 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.
From 6c83a870d1a4dabcedbf119a7ce412db82cefff7 Mon Sep 17 00:00:00 2001
From: Moritz Kassner <moritzkassner@gmail.com>
Date: Thu, 24 Dec 2015 20:47:13 +0100
Subject: [PATCH 1/2] change constants and header name to work with ffmpeg from
v2.2.16 "Muybridge" onward.
---
av/video/format.pyx | 10 +++++-----
include/libavutil/avutil.pxd | 16 +++++++++-------
2 files changed, 14 insertions(+), 12 deletions(-)
@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'