Fixed argument count, added image output to matlab, added experimental hash truncation