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

Fix the surface normals datapoints filter covariance matrix bug #465

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pointmatcher/DataPointsFilters/SamplingSurfaceNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void SamplingSurfaceNormalDataPointsFilter<T>::fuseRange(
const Matrix NN = (d.colwise() - mean);

// compute covariance
const Matrix C(NN * NN.transpose());
const Matrix C((NN * NN.transpose()) / T(colCount));
Vector eigenVa = Vector::Identity(featDim-1, 1);
Matrix eigenVe = Matrix::Identity(featDim-1, featDim-1);
// Ensure that the matrix is suited for eigenvalues calculation
Expand Down
2 changes: 1 addition & 1 deletion pointmatcher/DataPointsFilters/SurfaceNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void SurfaceNormalDataPointsFilter<T>::inPlaceFilter(
const Vector mean = d.rowwise().sum() / T(realKnn);
const Matrix NN = d.colwise() - mean;

const Matrix C(NN * NN.transpose());
const Matrix C((NN * NN.transpose()) / T(realKnn));
Vector eigenVa = Vector::Zero(featDim-1, 1);
Matrix eigenVe = Matrix::Zero(featDim-1, featDim-1);
// Ensure that the matrix is suited for eigenvalues calculation
Expand Down