Java implementation of Shape Context algorithm