Search code examples
mathcomputer-visionbeziersmoothing

Smoothing a 3 dimensional Euclidean space matrix


I have a general question about what method to use for smoothing a 3D (xyz) grid.

My program has large matrixes of 3D points obtained with a stereovision method. The shape of the result is always something like a semisphere, but it has a rugosity due to stereovision errors I want to eliminate.

The question is, how to do it? Rigth now I have half developed a method for soomthing, but I think there may be a better method.

My actual idea is to use Hermite method. The idea is to:

  1. Take all XY and smooth in two directions ->XYnew and XnewY

  2. Convert the Hermite lines into Bezier lines and find the cross point between XYnew and XnewY, having the new point. (Repeat with all points, normally 2000)

  3. Use hermite XYZ smoothing having XYZnew.

Rigth now I have the hermite surface smoothing and hermite line smoothing inplemented in C++, but the middle part is not as easy as espected.

Anyway, my question is, is this a correct method or is there another one which may be better?

Of course the idea is to elliminate the error generated by the stereovision method, this is not a computer graphics problem, is more a data treatment problem

Appendix:

At first I thougth that with a Z smoothing would be suficient, but clearly it is not, there is also a lot of XY error. In the images below you can see the Z fitting working but still it is really rugous as it can be seen in the 2 image. (The colours are deformations and shoul be quite continous) Image without Z smoothing enter image description here


Solution

  • Unless you have better priors, it's hard to beat the classic Taubin's algorithm: http://mesh.brown.edu/taubin/pdfs/taubin-iccv95a.pdf