A Unifying Statistical Approach for the Recognition of Invariant Product Shapes