I have a set of points in 3D which are sorted based on (X->Y->Z) coordinates. Some points (2 or 3 or even more) are very close to each other. I would like to find them and move them to a one point.
I searched but most of algorithms I found only works in 2D. Note that I don't want to delete any points. I just want to move close ones to a single location (stitching). I am only looking for an algorithm or if there is any opensource implementation in C++.