Wednesday, March 30, 2011

Coded Exposure Photography (Flutter Shutter Deblur, SIGGRAPH 2006)

In a conventional single-exposure photograph, moving objects or moving cameras cause motion blur. The exposure time defines a temporal box filter that smears the moving object across the image by convolution. This box filter destroys important high-frequency spatial details so that deblurring via deconvolution becomes an ill-posed problem.

Rather than leaving the shutter open for the entire exposure duration, we "flutter'' the camera's shutter open and closed during the chosen exposure time with a binary pseudo-random sequence. The flutter changes the box filter to a broad-band filter that preserves high-frequency spatial details in the blurred image and the corresponding deconvolution becomes a well-posed problem. We demonstrate that manually-specified point spread functions are sufficient for several challenging cases of motion-blur removal including extremely large motions, textured backgrounds and partial occluders.

Monday, March 28, 2011

Remote git diffs with bbdiff

  1. See previous post about key exchange.
  2. Add the following to .gitconfig:
        tool = "bbdiff"
        prompt = false
    [difftool "bbdiff"]
        cmd = /home/mihaip/bin/bbdiff "$REMOTE" "$LOCAL"
  3. Create bbdiff on the remote machine with the following contents:
    source_machine=${SSH_CLIENT%% *}
    for arg in "$@"
      readlink -fn $arg
      if [[ $arg == /tmp/* ]]
        scp $arg mihaip@$source_machine:$arg
      echo -n " "
    done | xargs ssh mihaip@$source_machine /usr/local/bin/bbdiff --wait --resume

Saturday, March 26, 2011

Google Application Utilities for Python

Same set of utilities used to build and run internal Python apps at Google:

  • Simple application startup integrated with python-gflags.
  • Subcommands for command-line applications.
  • Option to drop into pdb on uncaught exceptions.
  • Helper functions for dealing with files.
  • High-level profiling tools.
  • Timezone-aware wrappers for datetime.datetime classes.
  • Improved TestCase with many of the same methods as unittest2, plus helpful flags for test startup.
  • google_test setuptools command for running tests.
  • Helper module for creating application stubs.

Friday, March 25, 2011


xStats provides simple charts to help monitor your code performance.

  • FPS: Frames rendered per second. The higher the number the better.
  • MS: Milliseconds needed to render a frame. The lower the number the better.
  • MEM: Megabytes of memory used. Make sure it doesn't keep incrementing.

Editing files remotely

  1. See previous post about key exchange and get_source_machine
  2. Install FUSE and SSHFS.
  3. Ideally, mount the remote directories you're interested to the same path on your Mac. Most recently I've used:
    sshfs mihaip@snowberry.local:/D \
        /D \
  4. Add the following to your .bashrc:
    bbedit() {
      for arg in "$@"
        readlink -fn $arg
        echo -n " "
      done | xargs ssh mihaip@$source_machine /usr/local/bin/bbedit

Growl notifications from other machines

  1. Install growlnotify
  2. Set up public keys so that the other machine can SSH into the Mac without prompting
  3. Add the following to .bashrc:
    get_source_machine() {
      echo ${SSH_CLIENT%% *}
    function growlnotify() {
      if [ "$AT_HOME" = "true" ]; then return; fi
      ssh mihaip@$source_machine /usr/local/bin/growlnotify \
          -n "command-notifier" \
          -m \"[$PWD]\" \"$1\" 2> /dev/null
  4. In the Growl PrefPane, the notifications can be styled for the command-notifier "Application." (I like Music Video)

Wednesday, March 23, 2011

Using the Google V8 Javascript Engine in Java

V8 Java Bridge that allows any JavaScript code to run and call back to any provided Java methods.

Monday, March 14, 2011

JVM Crash in Development App Engine server after Mac OS X Java SE 6 Update 4

Restoring the previous JDK (from Time Machine) to /System/Library/Java/JavaVirtualMachines/ and pointing Eclipse at it worked for me.

Sunday, March 13, 2011


Backbone supplies structure to JavaScript-heavy applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.


Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux.

Underscore provides 60-odd functions that support both the usual functional suspects: map, select, invoke — as well as more specialized helpers: function binding, javascript templating, deep equality testing, and so on. It delegates to built-in functions, if present, so modern browsers will use the native implementations of forEach, map, reduce, filter, every, some and indexOf.


CoffeeScript is a little language that compiles into JavaScript. Underneath all of those embarrassing braces and semicolons, JavaScript has always had a gorgeous object model at its heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.

The golden rule of CoffeeScript is: 'It's just JavaScript'. The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without warnings, will work in every JavaScript implementation, and tends to run as fast or faster than the equivalent handwritten JavaScript.

Friday, March 11, 2011


D3 allows you to bind arbitrary data to a Document Object Model (DOM), and then apply data-driven transformations to the document. As a trivial example, you can use D3 to generate a basic HTML table from an array of numbers. Or, use the same data to create an interactive SVG bar chart with smooth transitions and interaction.

Tuesday, March 8, 2011

Monday, March 7, 2011

Chef - Opscode

Chef is an open source systems integration framework built to bring the benefits of configuration management to your entire infrastructure.

Thursday, March 3, 2011


The boilerpipe library provides algorithms to detect and remove the surplus 'clutter' (boilerplate, templates) around the main textual content of a web page.

Instance/web API running at

Wednesday, March 2, 2011

visionmedia/express - GitHub

Fast (and small) server-side JavaScript web development framework built on node and Connect.