New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI subsample improvements: #1925
Merged
dgirardeau
merged 12 commits into
CloudCompare:master
from
HeadLessHUN:octree_by_grid_size
Dec 31, 2023
Merged
CLI subsample improvements: #1925
dgirardeau
merged 12 commits into
CloudCompare:master
from
HeadLessHUN:octree_by_grid_size
Dec 31, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It will decimate the cloud by OCTREE algorithm, but it will calculate a given octree level based on the given cell size.
…Refactoring as well) it will try to guess an octree number based on number of points, but it will run iteratively, till it overflows the given number of points, so it will always result in the highest possible OCTREE number. it will be slower then a given octree number, but it will be way faster than load->subsample->save load->subsample->save from command line. It won't give back a result exactly the given number of points as it does the RANDOM SAMPLING, but it will result a gridded cloud, which could make better understanding in downstream CAD applications.
Maybe, I'm blind, but i don't see any re-run job :), but i hope it is a permission instead :) |
add suboption to -SS OCTREE NUMBER_OF_POINTS(PERCENT) update some error messages declared some option names globally
dgirardeau
requested changes
Dec 30, 2023
…bsampler. use DgmOctree::getCellNumber to calculate octree level before any subsampling done.
dgirardeau
reviewed
Dec 30, 2023
replace do ... while , with for. i didn't use std:clamp
dgirardeau
reviewed
Dec 30, 2023
I know octreeLevel = 1 is almost never gonna happen, but why not support it :)
dgirardeau
approved these changes
Dec 31, 2023
dgirardeau
approved these changes
Dec 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I added two suboption for -SS OCTREE
- New sub-option for -SS OCTREE command: NUMBER_OF_POINTS {number} to subsample with the highest octree number where the the resulting point count won't exceed the given number of points (it does mean that it will run multiple octree, but saves only the last one)
- New sub-option for -SS OCTREE command: CELL_SIZE {size} to calculate octree number from bounding box, and the given cell_size
- New sub-option for -SS OCTREE NUMBER_OF_POINTS command: PERCENT {number} to calculate count from PERCENT . PERCENT should be a decimal between 0 and 100.
- New sub-option for -SS RANDOM command: PERCENT {number} to calculate count from PERCENT . PERCENT should be a decimal between 0 and 100.
References
#1922
https://www.cloudcompare.org/forum/viewtopic.php?f=14&t=6357