zarquon42b/Rvcg

Not really an issue, probably more of a question...

Closed this issue · 1 comments

Dear Dr. Schlager,

I am trying to implement the mesh pipeline as implemented by Peter Claes et al. in Meshmonk into R. For this, I am borrowing heavily on Rvcg, Morpho and mesheR. The aim is to apply elastic deformation of a template facial mask on patient's faces, but with some specific algorithmic requirements (weighted KNN, geometrically stable sampling, and 'double convolution', i.e. viscous and elastic deformation. The meshes were generated using a custom-built stereoprohotgrammetry setup: https://www.researchgate.net/project/THREE-DIMENSIONAL-FACIAL-CAPTURE-USING-A-CUSTOM-BUILT-PHOTOGRAMMETRY-SETUP-A-PRELIMINARY-REPORT-ON-DESIGN-PERFORMANCE-AND-COST

Now to my (simple) question: When running vcgKDtree to find say k = 30 neirest neighbours per point, it provides a list of the indices and corresponding distances. I assumed (never a good idea) the list would contain the k neirest points per sampled vertex sequentially, but this is not the case. Can you 'enlighten' this poor simpleton on how the indices are ordered in the list?

With kind regards,
Hans Wellens

Aha. It seems I have found it: If k = 30 neighbours are sought for 10.000 points, the k neirest neighbours for the first sampled vertex are stored in the list on positions 1, 10.001, 20.001, 30.001, 40.001, ... , 290.001. For the next sampled vertex, the corresponding list positions are one shifted up, and so forth. So the list basically consists of "interleaved lists".