A Rapid Graph-based Method for Arbitrary Transformation Invariant Pattern Classification