Open maramusag opened 2 years ago
This is an interesting idea I have also thought about. Have you found a complete example that starts with a point cloud and arbitrary point of view XYZ, and then derives an equirectangular 360x180 image from it? Your two links cover parts of the problem but it might be helpful to see a working implementation and then be able to work backwards from there to adapt it to what's available in potree.
My other thought is that this sounds pretty processor intensive, so I wonder what the performance would be like doing it all in the browser? I'm sure it could be possible with some web workers though. Is your idea to give the user the ability to essentially take a 360 screenshot of any area they want? If you had some predefined positions you could possibly preprocess those and then add them to your potree viewer to save some work in the browser.
Definitely interested to hear what you find!
Hi, I think these two references can help to respond to your question. It's a complete example that starts with a point cloud and arbitrary point of view XYZ and then derives an equirectangular 360x180 image that my colleague has done in her Ingenieer thesis. But, it doesn't use Potree format, only LAS file as an input. You can take the equations and the used approach. I wish it can help.
Thanks @akharroubi, I will check those out. Is there a copy in English for the second document? Also, reading through the first document it seems that alot of the data science was done with python. Is the python code from the research also available?
Thanks @mikepianka Yes you are correct on all fronts. Possibly using web workers to take a 360 screenshot of an arbitrary XYZ. This may even be saved for future reference of a point of interest. We also considered preprocessing on the orginal las file
**One pie in the sky thought is also to have a google street view like function, as you move through the cloud, the 360 images are constantly generated
Thanks @akharroubi This one looks familiar, i will have another look ...now if only someone could translate it to potree code. Happy days
Has anyone been able to dynamically generate a 360 panorama image from the potree point cloud, for a given XYZ position, where our points also have color information.?
I am thinking there are a few possible ways
1: We have lovely equations with Spherical Projection, that would be fast and much preferred. As in the PCL C++ library(no thanks) such as https://towardsdatascience.com/spherical-projection-for-point-clouds-56a2fc258e6c or in Python with Open3D , such as https://blog.ekbana.com/planar-and-spherical-projections-of-a-point-cloud-d796db76563e
But these have the problem of the point cloud format they need as input. I could use the original las file, and convert to the formats such as PCL / PCD, possible, but in potree memory on client would be better
2: from every point on the outer bounding box (or bounding sphere) of the point cloud , do a ray trace to your XYZ point, if you intersect any point on the way then use it, overwriting any previous point on your ray you have intersected. As for resolution of the image, we would average points within a range
3: very similar to above, have a Sphere volume, which potree has. We can clip a sphere volume, (potree hightlights everything inside). What we want is every point on the surface of this sphere, and start from the full point cloud bounding sphere, and contract the sphere until we are zero size sphere at out XYZ. Again ignoring any points that intersect and allow average for resolution Is there a way to get every point on the surface of the Sphere volume?