Skip to content

Instantly share code, notes, and snippets.

[New Thread 0x7ffff46c1700 (LWP 39858)]
[New Thread 0x7ffff3ec0700 (LWP 39859)]
[New Thread 0x7ffff36bf700 (LWP 39860)]
[New Thread 0x7ffff2ebe700 (LWP 39861)]
[New Thread 0x7ffff26bd700 (LWP 39862)]
[New Thread 0x7ffff1ebc700 (LWP 39863)]
[New Thread 0x7ffff16bb700 (LWP 39864)]
[New Thread 0x7ffff0eba700 (LWP 39865)]
[New Thread 0x7ffff06b9700 (LWP 39866)]
[New Thread 0x7fffefeb8700 (LWP 39867)]
@ahojnnes
ahojnnes / camera.py
Created August 14, 2012 10:20 — forked from bdholt1/camera.py
Camera class
import numpy as np
from scipy import linalg
def RawDepthToMeters(depthValue):
"""
Convert a kinect depth value to meters
"""
if (depthValue < 2047):
return float(1.0 / (float(depthValue) * -0.0030711016 + 3.3309495161))
# coding: utf-8
import numpy as np
from skimage.measure import EllipseModel
# Play around with sigma here, the larger the the better you notice the
# qualitiy difference between algebraic and geometric fit
#cython: cdivision=True
#cython: boundscheck=False
#cython: nonecheck=False
#cython: wraparound=False
cimport numpy as cnp
import numpy as np
from libc.math cimport sin, cos, M_PI, round
import urllib
import json
import copy
from collections import OrderedDict
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
import dateutil.parser
from dateutil.relativedelta import relativedelta
@ahojnnes
ahojnnes / gist:3734557
Created September 16, 2012 21:59
OpenCV - skimage corner detection comparison
from skimage.feature import peak_local_max
from skimage.feature.corner import corner_harris, corner_subpix, corner_foerstner
from skimage import data
from skimage.io import imsave
from skimage.util import img_as_float, img_as_ubyte
from skimage.color import rgb2gray
import pylab as plt
import numpy as np
import cv2
@ahojnnes
ahojnnes / ghostscript.m
Last active December 11, 2019 18:36
Fixes a bug in `export_fig` on Max OSX 10.9 Mavericks, ghostscript 9.07 from homebrew (and MATLAB R2013a).
%GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path
% is stored for future reference.
%
% Once found, the executable is called with the input command string.