# Filtering out outliers in a vector field [closed]

I have a vector field that represents a incompressible fluid flow (ie. divergence-free, ideally) that contains a certain percentage of vectors that are completely incorrect, due to the procedure used to obtain this field. These vectors thus do not follow the flow. The vector field is also noisy, and is not on a grid; thus, they're literally just vectors distributed somewhat randomly in 3D space

I have a few ideas on how to remove these incorrect vectors. However, is there either some textbook algorithm or paper on removing outliers in a non-gridded vector field? I am not an algorithms person, so I thought perhaps someone would know of a way to do this that's known to work before I spend a lot of time on this.

• Are the vectors defined on a mesh? Can you tell us a bit more about how they were obtained? – nicoguaro Feb 12 at 4:29
• The vectors are not on any kind of grid or mesh, they're approximately uniformly randomly distributed. I'm not sure if I can say exactly how they were obtained as it's unpublished work. – Juehang Qin Feb 12 at 4:39
• Then I think it would be difficult to help you. – nicoguaro Feb 12 at 4:51
• Just to clarify, do you want the resulting field to be on a grid? Also, there are mathematical ways to project your velocity field into the 'closest' divergence-free one (keyword: Helmholtz decomposition). – MPIchael Feb 13 at 10:23
• How do you know those vectors that do not follow others should be removed? If that's a measurement result or even a simulation result, that's what you got from your framework. If those vectors are wrong (probably in your opinion), so why people should believe that other vectors that just look reasonable to you are correct? Because they just seem reasonable but maybe all the vectors in your field are just incorrect. You can't simply filter outliers. – Alone Programmer Feb 14 at 0:08

The perfect solution of your problem is: L1 minimization through $$\lambda_2$$ $$\lambda_3$$ eigenvalues of the Structure Tensor of the vector field