from  http://sourceforge.net/p/opencamera/code/ci/master/tree/