[SciPy-user] Finding clustered vectors

Stefan van der Walt stefan at sun.ac.za
Wed Nov 22 04:23:56 CST 2006

Hi Aaron

On Tue, Nov 21, 2006 at 06:34:01PM -0800, Aaron Hoover wrote:
> I've got a question maybe some of you can help me with. I have two  
> images, one of which is a planar translation of the other, so I know  
> it contains some of the same "features" (using this loosely) as the  
> first image. I have some different approaches matching features and  
> using those results to calculate candidate 2D shift vectors for each  
> 2 image sequence. Most of the time, those vectors aren't all the same  
> due to noise, imperfect matching, features leaving the frame, etc.  
> However there are usually at least a few whose dx and dy values are  
> very close, while the others are somewhat noisy and relatively  
> randomly distributed.

Not a direct answer to your question, but maybe relevant to your
problem.  I have written wrappers around Birchfield's KLT tracker, and
a module to read in SIFT and SURF feature files.  I use these features
to estimate similarity transformations.

When you have a bunch of features like this, and want to estimate the
transformation, it is essential to make use of outlier rejection,
otherwise those values skew the whole fit.  Currently, I use a very
simplistic method:

a) Estimate the transformation
b) Transform the points, and measure the distances between source and
   target positions.
c) Calculate the mean and variance of the distances.  Reject
   point-pairs with distances larger than variance.
d) Estimate the transformation again.

I'd like to take a look at RANSAC and all the other sample consensus
methods out there still.

If you want to play around with any of the code, let me know and I'll
share my repository online.


More information about the SciPy-user mailing list