[SciPy-user] how to filter outliers from an array

Aaron Hoover ahoover at eecs.berkeley.edu
Mon Oct 30 14:35:39 CST 2006

Hi All,

I'm doing feature matching between two images and as a result I get  
back an array of dx, dy shift values in pixel space for potential  
features that match between two images. I'd like to be able to throw  
out [dx, dy] vectors for which either value deviates significantly  
(more than one std deviation, perhaps) from the mean (I'm dealing  
with 2D rigid body translations only. I could do this by looping over  
the values and comparing them individually to the mean, but I'm  
wondering if there's a more compact (single line?) way of doing this  
perhaps using the scipy.stats package. Something along the lines of  
the filter built-in for lists, but that handles the higher  
dimensionality, would be nice.


More information about the SciPy-user mailing list