Skip to content
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
merged 12 commits into from Dec 31, 2023

Conversation

HeadLessHUN
Copy link
Collaborator

@HeadLessHUN HeadLessHUN commented Dec 27, 2023

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

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.
@HeadLessHUN
Copy link
Collaborator Author

Maybe, I'm blind, but i don't see any re-run job :), but i hope it is a permission instead :)

@HeadLessHUN HeadLessHUN reopened this Dec 27, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
@HeadLessHUN HeadLessHUN reopened this Dec 30, 2023
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
qCC/ccCommandLineCommands.cpp Outdated Show resolved Hide resolved
replace do ... while , with for.
i didn't use std:clamp
I know octreeLevel = 1 is almost never gonna happen, but why not support it :)
@HeadLessHUN HeadLessHUN reopened this Dec 30, 2023
@dgirardeau dgirardeau merged commit d9549d8 into CloudCompare:master Dec 31, 2023
10 checks passed
@HeadLessHUN HeadLessHUN deleted the octree_by_grid_size branch January 8, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants