Describe the bug
In the progressive morphological filter implementation I see that there is the following snippet of code to compute the different window sizes to use.
|
|
|
while (window_size < max_window_size_) |
|
{ |
|
// Determine the initial window size. |
|
if (exponential_) |
|
window_size = cell_size_ * (2.0f * std::pow (base_, iteration) + 1.0f); |
|
else |
|
window_size = cell_size_ * (2.0f * (iteration+1) * base_ + 1.0f); |
I think there is an error in how max_window_size is being considered.
From the code window_size is treated as a dimension quantity (e.g. meters) while max window size is stored as an int, as if it represents the number of cells rather than the maximum dimension of a window size. So for me it is wrong that they are compared directly.
Expected behavior
I would expect max_window_size to be a float or double like window_size and represent the maximum dimension of the window size.
Another possibility is to keep max_window_size as an int but consider it using something like:
while (window_size < max_window_size_ * cell_size)
so that dimensions are coherent.
Your Environment
- PCL Version 1.12 but the same is visible also in other versions
Other context
The same is true also for ApproximateProgressiveMorphologicalFilter
Describe the bug
In the progressive morphological filter implementation I see that there is the following snippet of code to compute the different window sizes to use.
pcl/segmentation/include/pcl/segmentation/impl/progressive_morphological_filter.hpp
Lines 85 to 92 in e8ed4be
I think there is an error in how max_window_size is being considered.
From the code window_size is treated as a dimension quantity (e.g. meters) while max window size is stored as an int, as if it represents the number of cells rather than the maximum dimension of a window size. So for me it is wrong that they are compared directly.
Expected behavior
I would expect max_window_size to be a float or double like window_size and represent the maximum dimension of the window size.
Another possibility is to keep max_window_size as an int but consider it using something like:
while (window_size < max_window_size_ * cell_size)so that dimensions are coherent.
Your Environment
Other context
The same is true also for ApproximateProgressiveMorphologicalFilter