Skip to content

Conversation

@fabiencastan
Copy link
Member

In particular configuration, like a failed resection, we may end-up with unexpected statistics.
Put some limits to avoid that.

Copy link
Contributor

@servantftransperfect servantftransperfect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the outStats.max values are not checked for a value of 0, which may create a +inf result in histogram constructor. Although this is not realistic, this may happen in tests and also (rarely) in "computeScaleHistogram".

@servantftransperfect
Copy link
Contributor

I modified the code to clamp on both sides of range.

@fabiencastan fabiencastan merged commit e52b4e5 into develop Jun 23, 2025
5 checks passed
@fabiencastan fabiencastan deleted the fix/sfmStats branch June 23, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants