How to maintain concavity while normalising a set of samples?

15 Views Asked by At

I have a set of 2D samples that approximate a geometric shape that I am trying to construct. Due to measuring errors some samples are slightly off, generating "jaggy" artifacts in the surface of the reconstructed shape.

To correct this I group samples by small regions until I have 20 samples. (i.e I take a sample and find the 20 closest neighbours to that sample) and then take the average.

This result does fully eliminate the noise in the samples. However, I have the additional restriction that the de-noised samples MUST remain inside the convex hull of the original data, however due to averaging, samples in concave regions move outside the convex hull.

Is there a formula to do a similar kind of averaging but that restricts the points to move only inside the convex hull?

This needs to be cheap, computationally wise, as well. So checking whether a generated point is inside or not of the convex hull and then moving it to be inside the convex hull is out of the question.