Function Polylidar::MeshHelper::BilateralFilterNormals¶
Defined in File MeshHelper.hpp
Function Documentation¶
-
void Polylidar::MeshHelper::BilateralFilterNormals(HalfEdgeTriangulation &mesh, int iterations, double sigma_length, double sigma_angle)¶
Perform Bilateral Filtering on the triangular mesh. Only the normals are smoothed. Neighbors are in 1-ring edge adjecency.
\(W_c(||c_i - c_j||) = \operatorname{exp}(-||c_i - c_j||^2/2\sigma_c^2 )\) \(W_s(||n_i - n_j||) = \operatorname{exp}(-||n_i - n_j||^2/2\sigma_s^2 )\) \(K = 1 / \sum_{j=1}^{N} W_c(||c_i - c_j||) \cdot W_s(||n_i - n_j||)\)
- Parameters
mesh –
iterations – Number of iterations
sigma_length – The standard deviation for exponential decay based on centroid difference between neighbors
sigma_angle – The standard deviation for exponential decay based on surface normal difference between neighbors