diff --git a/openbr/core/eigenutils.cpp b/openbr/core/eigenutils.cpp index 51a9c0e..b1ff605 100644 --- a/openbr/core/eigenutils.cpp +++ b/openbr/core/eigenutils.cpp @@ -8,7 +8,7 @@ void EigenUtils::printSize(Eigen::MatrixXf X) { qDebug() << "Rows=" << X.rows() << "\tCols=" << X.cols(); } -float EigenUtils::eigStd(const Eigen::MatrixXf& x) { +float EigenUtils::stddev(const Eigen::MatrixXf& x) { return sqrt((x.array() - x.mean()).pow(2).sum() / (x.cols() * x.rows())); } diff --git a/openbr/core/eigenutils.h b/openbr/core/eigenutils.h index deb9787..fae0511 100644 --- a/openbr/core/eigenutils.h +++ b/openbr/core/eigenutils.h @@ -77,7 +77,7 @@ namespace EigenUtils QList matrixToPoints(const Eigen::MatrixXf P); // Compute the element-wise standard deviation - float eigStd(const Eigen::MatrixXf& x); + float stddev(const Eigen::MatrixXf& x); } template diff --git a/openbr/plugins/eigen3.cpp b/openbr/plugins/eigen3.cpp index b9db883..dfe4ba8 100644 --- a/openbr/plugins/eigen3.cpp +++ b/openbr/plugins/eigen3.cpp @@ -600,7 +600,7 @@ class SparseLDATransform : public Transform //Only works on binary class problems for now assert(ldaOrig.projection.cols() == 1); - float ldaStd = EigenUtils::eigStd(ldaOrig.projection); + float ldaStd = EigenUtils::stddev(ldaOrig.projection); for (int i = 0; i < ldaOrig.projection.rows(); i++) if (abs(ldaOrig.projection(i)) > varThreshold * ldaStd) selections.append(i);