Fix exact PMF height threshold units - #6473
Open
jagrutipatilp wants to merge 1 commit into
Open
Conversation
Exact PMF window sizes are already expressed in input coordinate units. Avoid multiplying their difference by cell size a second time, and add a scale-invariance regression test.
This file contains hidden or 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
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.
Summary
cell_size_multiplier from the exact progressive morphological filter's height-threshold calculation.Rationale
ProgressiveMorphologicalFilteralready computes its window sizes in input-coordinate units:The height-threshold calculation then multiplied the difference between two such window sizes by
cell_size_again. With a dimensionless slope, this produced a squared-distance term that was added toinitial_distance_, and could change classifications when the same cloud was represented at a different coordinate scale.The corrected expression applies the slope directly to the window-size difference. This is consistent with the PMF formulation described by Zhang et al., where cell size is used once to convert a window increment expressed in cells.
ApproximateProgressiveMorphologicalFilteris intentionally unchanged: its window sizes are stored as cell counts, so its multiplication bycell_size_remains necessary.Regression test
The new test classifies a synthetic raised plateau at scales
1and4, scaling the coordinates and all distance-valued parameters together. Before this fix, the extra multiplier gives different ground classifications at the two scales. With the corrected formula, both runs classify the same 13 indices as ground.Testing
git diff --check origin/master...HEAD— passes.Follow-up to #6461 and the units discussion.