An Improved Pattern Matching
Algorithm
O(b)
O(n)
O(mn)
O(mn)
O(m2n)
O(mn)
T = O(b+m2n)
Clear all the bins;
for each scene point s
   Mark the bin for s as occupied;
for each pattern point p
   for each scene point s
     Determine translation so that p falls on s;
     count = 0;
     for each translated pattern point q
       if (q falls in an occupied bin) count++;
     Remember which p,s gives max count;
CS409 - Spring 2000
6