Closed xarthurx closed 2 years ago
Thanks for the comments. These are nice experiments, clearly showing the issue.
There are two problems here:
The reason is that the concept of sample density is somewhat ill-defined near discontinuities. Density is defined as the number of samples per area. If you have no samples on one side of the discontinuity, you will have more samples to compensate for it on the other side. Similarly, if you have too many samples on one side, you won't have any on the other side.
That said, in my tests (years ago) I could avoid these problems using a different density function. Using your notation, it would look like something like this:
auto d = d_init * ( 3 - 2*den(p0) );
I don't remember much about how I came up with this. See my Sample Elimination paper (Sec. 5.2) for more details.
Similar to issue https://github.com/cemyuksel/cyCodeBase/issues/10 I'm trying to explore the adaptive sampling method using an image-based density function.
When using a smoothly changing density, the results looks cool.
However, when using an image with a sudden change of the density value, the points seems to accumulated at the edges:
The current weight function is like this:
where the
den(p0)
will get the grayscale value(0,1)
of the image.I've tested several different forms of weight function, but this issue seems to persist.