daavoo / pyntcloud

pyntcloud is a Python library for working with 3D point clouds.
http://pyntcloud.readthedocs.io
MIT License
1.4k stars 223 forks source link

add farthest point sampling for points sampler, and modify the uniform sampler for the meshes #253

Closed hansen7 closed 5 years ago

hansen7 commented 5 years ago

Hi, Castro

I have added farthest point sampling into the points sampler, which is an algorithm applied to the cutting-edge research, see here for the relevant paper, and here for the description of the algorithm.

And I think it is probably better to sample u, v uniformly from [0, 1] and [0, u] respectively in the mesh sampler. Because to ensure the sampled points are within that face, it requires not only u + v <= 1 but also u >= 0 and v >= 0, but for the original procedure, which is sampled from Gaussian then truncation, it did not resolve the issues with negative sampling results. Plus it is more concise now.

I am very interested to make more commitments since it intersects with my research projects during PhD, I think next step is to develop the Poisson Disk Sampling as discussed here: #239, and is it okay for me to develop a new part for the normals/curvatures calculations(directly from the points) and with reconstruction on the doc as well.

Thanks.

daavoo commented 5 years ago

Hola @hansen7,

Thank you so much for the contribution! I'm leaving a few comments in the P.R. review.

Pd. I'm glad to hear that you are interested in making more commitments, don't hesitate to ask anything.

daavoo commented 5 years ago

In addition to the above comments, please follow the steps described in:

https://pyntcloud.readthedocs.io/en/latest/samplers_dev.html#let-pyntcloud-know-about-your-sampler

In order to make your new sample available and easily accesible for everybody

hansen7 commented 5 years ago

haha no worries, is there other places for development, I am looking forward to more contributions