Grid-Subsampling wiht height and position average

Feel free to ask any question here
Post Reply
PeterV
Posts: 4
Joined: Fri Feb 11, 2022 10:09 am

Grid-Subsampling wiht height and position average

Post by PeterV »

Hi,

i would like to know, if it is possible to resample a point cloud using a grid (similar to the rasterize tool) with z-Projection, where all points falling in the cell are averaged in X, Y and Z coordinates. The rasterize tool can average in height, but sets the x and y values to the center of the cell, i would like that all values x-y and z are averaged in a specific cell. It would be similar as the octree resampling with averaging, but with the cells having infinite extension over the whole z-Axis.

Or should i use rasterize? then i would have this question: When using cell height:average with resample input cloud, the algorithm searchs the nearest point to the cell centre and overvrites it with the average height, or search the point which comes closest to the average height and overvrites with the average height?
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Grid-Subsampling wiht height and position average

Post by daniel »

See https://www.cloudcompare.org/doc/wiki/i ... nput_cloud

In the Rasterize tool, the 'Resample input cloud' option will indeed look for the point which is the closest to the cell center, and then overwrite its height with the minimum/average/maximum Z.

There's no way to 'average' the points within a cell right now.
Daniel, CloudCompare admin
PeterV
Posts: 4
Joined: Fri Feb 11, 2022 10:09 am

Re: Grid-Subsampling wiht height and position average

Post by PeterV »

Thank you for the answer.
This causese some trouble when rasterizing steep terrain with for example the minimum option: the resulting terrain is moved horizontally approx. half a cell size in the direction away from the exposition.
I would be very happy if with "resample input cloud" min/max points are extracted with their original point coordinates instead of the nearest point to the cell center, and if an average "height and position" could be made possible.
Maybe you can add it to the wishlist?
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Grid-Subsampling wiht height and position average

Post by daniel »

Yes, I added this request to the TODO list.
Daniel, CloudCompare admin
Stefan
Posts: 8
Joined: Fri Nov 08, 2019 10:45 pm
Location: Styria/Austria
Contact:

Re: Grid-Subsampling wiht height and position average

Post by Stefan »

I used to have the same problem. I need the minimum height to get rid of vegetation in my lidar point cloud (Or at least ninimize a bit).

But I have this work around. Maybe its working for you as well...

I use rasterize with the minimum option on a very fine raster (like 0.10m). Then in a second run i do a rasterize with my End-resolution (like 0.50) and the average option. So the shift is only 5cm (half a pixel) and therefore the error only 2,5cm in height (at 100% slope).

Its enough for me...

When I had a wish for improving of the rasterize tool (It nearly christmas!). I would like a raster where the rasterpoint has the height of its nearest point. Like when you do a resample but with the look of a rasterize (points in lines and rows).

Whatever. I really like CloudCompare. You guys do an amazing job. As it help me a lot within my small business I also will donate something this year. You really apprecitate it.

Happy Holidays
Stefan
Post Reply