diff --git a/doc/tutorial/misc/tutorial-pf.dox b/doc/tutorial/misc/tutorial-pf.dox index a8f275b0c0..35d5264bbe 100644 --- a/doc/tutorial/misc/tutorial-pf.dox +++ b/doc/tutorial/misc/tutorial-pf.dox @@ -61,7 +61,7 @@ we have: w_i = l(\textbf{x}_i, \textbf{z}) \f] -After an update, a check is performed to see if the PF is not degenerated (i.e. if the weigths of most particles became very low). +After an update, a check is performed to see if the PF is not degenerated (i.e. if the weights of most particles became very low). If the PF became degenerated, the particles are resampled depending on a resampling scheme. Different kind of checks and of resampling algorithms exist in the litterature. diff --git a/modules/core/include/visp3/core/vpParticleFilter.h b/modules/core/include/visp3/core/vpParticleFilter.h index c244af11ac..9a30d4e14b 100644 --- a/modules/core/include/visp3/core/vpParticleFilter.h +++ b/modules/core/include/visp3/core/vpParticleFilter.h @@ -78,7 +78,7 @@ BEGIN_VISP_NAMESPACE w_i = l(\textbf{x}_i, \textbf{z}) \f] - After an update, a check is performed to see if the PF is not degenerated (i.e. if the weigths of most particles became very low). + After an update, a check is performed to see if the PF is not degenerated (i.e. if the weights of most particles became very low). If the PF became degenerated, the particles are resampled depending on a resampling scheme. Different kind of checks and of resampling algorithms exist in the litterature. In this class, we implemented the Simple Resampling algorithm in a dedicated method and let to the user the possibility of writing user-defined check and resampling methods. diff --git a/modules/core/include/visp3/core/vpStatisticalTestEWMA.h b/modules/core/include/visp3/core/vpStatisticalTestEWMA.h index 0aca73d438..893d3ebedb 100644 --- a/modules/core/include/visp3/core/vpStatisticalTestEWMA.h +++ b/modules/core/include/visp3/core/vpStatisticalTestEWMA.h @@ -87,11 +87,7 @@ class VISP_EXPORT vpStatisticalTestEWMA : public vpStatisticalTestAbstract * * \sa detectUpwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectDownwardMeanDrift() override; -#else - virtual vpMeanDriftType detectDownwardMeanDrift(); -#endif + virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE; /** * \brief Detects if an upward mean drift occurred on the mean. @@ -100,11 +96,7 @@ class VISP_EXPORT vpStatisticalTestEWMA : public vpStatisticalTestAbstract * * \sa detectDownwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectUpwardMeanDrift() override; -#else - virtual vpMeanDriftType detectUpwardMeanDrift(); -#endif + virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE; /** * \brief Update m_s and if enough values are available, compute the mean, the standard @@ -112,22 +104,14 @@ class VISP_EXPORT vpStatisticalTestEWMA : public vpStatisticalTestAbstract * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual bool updateStatistics(const float &signal) override; -#else - virtual bool updateStatistics(const float &signal); -#endif + virtual bool updateStatistics(const float &signal) VP_OVERRIDE; /** * \brief Update the test signals. * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual void updateTestSignals(const float &signal) override; -#else - virtual void updateTestSignals(const float &signal); -#endif + virtual void updateTestSignals(const float &signal) VP_OVERRIDE; public: /** diff --git a/modules/core/include/visp3/core/vpStatisticalTestHinkley.h b/modules/core/include/visp3/core/vpStatisticalTestHinkley.h index 99906bf5a8..68a384560b 100644 --- a/modules/core/include/visp3/core/vpStatisticalTestHinkley.h +++ b/modules/core/include/visp3/core/vpStatisticalTestHinkley.h @@ -141,11 +141,7 @@ class VISP_EXPORT vpStatisticalTestHinkley : public vpStatisticalTestAbstract * * \return \b vpMeanDriftType::MEAN_DRIFT_DOWNWARD if a downward mean drift occurred, \b vpMeanDriftType::MEAN_DRIFT_NONE otherwise. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectDownwardMeanDrift() override; -#else - virtual vpMeanDriftType detectDownwardMeanDrift(); -#endif + virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE; /** * \brief Detects if an upward mean drift occurred on the mean. @@ -154,11 +150,7 @@ class VISP_EXPORT vpStatisticalTestHinkley : public vpStatisticalTestAbstract * * \sa detectDownwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectUpwardMeanDrift() override; -#else - virtual vpMeanDriftType detectUpwardMeanDrift(); -#endif + virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE; /** * \brief Update m_s and if enough values are available, compute the mean, the standard @@ -166,22 +158,15 @@ class VISP_EXPORT vpStatisticalTestHinkley : public vpStatisticalTestAbstract * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual bool updateStatistics(const float &signal) override; -#else - virtual bool updateStatistics(const float &signal); -#endif + virtual bool updateStatistics(const float &signal) VP_OVERRIDE; + + /** + * \brief Update the test signals. + * + * \param[in] signal The new value of the signal to monitor. + */ + virtual void updateTestSignals(const float &signal) VP_OVERRIDE; -/** - * \brief Update the test signals. - * - * \param[in] signal The new value of the signal to monitor. - */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual void updateTestSignals(const float &signal) override; -#else - virtual void updateTestSignals(const float &signal); -#endif public: /** * @brief Construct a new vpStatisticalTestHinkley object. diff --git a/modules/core/include/visp3/core/vpStatisticalTestMeanAdjustedCUSUM.h b/modules/core/include/visp3/core/vpStatisticalTestMeanAdjustedCUSUM.h index ab3903b64c..6e4554d91b 100644 --- a/modules/core/include/visp3/core/vpStatisticalTestMeanAdjustedCUSUM.h +++ b/modules/core/include/visp3/core/vpStatisticalTestMeanAdjustedCUSUM.h @@ -101,22 +101,14 @@ class VISP_EXPORT vpStatisticalTestMeanAdjustedCUSUM : public vpStatisticalTestA * * \sa detectUpwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectDownwardMeanDrift() override; -#else - virtual vpMeanDriftType detectDownwardMeanDrift(); -#endif + virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE; /** * \brief Detects if a upward jump occurred on the mean. * * \return upwardJump if a upward jump occurred, noJump otherwise. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectUpwardMeanDrift() override; -#else - virtual vpMeanDriftType detectUpwardMeanDrift(); -#endif + virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE; /** * \brief Update m_s and if enough values are available, compute the mean, the standard @@ -124,22 +116,15 @@ class VISP_EXPORT vpStatisticalTestMeanAdjustedCUSUM : public vpStatisticalTestA * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual bool updateStatistics(const float &signal) override; -#else - virtual bool updateStatistics(const float &signal); -#endif + virtual bool updateStatistics(const float &signal) VP_OVERRIDE; /** * \brief Update the test signals. * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual void updateTestSignals(const float &signal) override; -#else - virtual void updateTestSignals(const float &signal); -#endif + virtual void updateTestSignals(const float &signal) VP_OVERRIDE; + public: /** * \brief Construct a new vpStatisticalTestMeanAdjustedCUSUM object. diff --git a/modules/core/include/visp3/core/vpStatisticalTestShewhart.h b/modules/core/include/visp3/core/vpStatisticalTestShewhart.h index dbc17aedcf..ece6dc8ec5 100644 --- a/modules/core/include/visp3/core/vpStatisticalTestShewhart.h +++ b/modules/core/include/visp3/core/vpStatisticalTestShewhart.h @@ -111,11 +111,7 @@ class VISP_EXPORT vpStatisticalTestShewhart : public vpStatisticalTestSigma /** * \brief Compute the upper and lower limits of the test signal. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual void computeLimits() override; -#else - virtual void computeLimits(); -#endif + virtual void computeLimits() VP_OVERRIDE; /** * \brief Detects if a downward mean drift occurred. @@ -124,12 +120,7 @@ class VISP_EXPORT vpStatisticalTestShewhart : public vpStatisticalTestSigma * * \sa detectUpwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectDownwardMeanDrift() override; -#else - virtual vpMeanDriftType detectDownwardMeanDrift(); -#endif - + virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE; /** * \brief Detects if an upward mean drift occurred on the mean. * @@ -137,11 +128,7 @@ class VISP_EXPORT vpStatisticalTestShewhart : public vpStatisticalTestSigma * * \sa detectDownwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectUpwardMeanDrift() override; -#else - virtual vpMeanDriftType detectUpwardMeanDrift(); -#endif + virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE; /** * \brief Update m_s and if enough values are available, compute the mean, the standard @@ -149,22 +136,14 @@ class VISP_EXPORT vpStatisticalTestShewhart : public vpStatisticalTestSigma * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual bool updateStatistics(const float &signal) override; -#else - virtual bool updateStatistics(const float &signal); -#endif + virtual bool updateStatistics(const float &signal) VP_OVERRIDE; /** * \brief Update the test signals. * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual void updateTestSignals(const float &signal) override; -#else - virtual void updateTestSignals(const float &signal); -#endif + virtual void updateTestSignals(const float &signal) VP_OVERRIDE; public: /** * \brief Construct a new vpStatisticalTestShewhart object. diff --git a/modules/core/include/visp3/core/vpStatisticalTestSigma.h b/modules/core/include/visp3/core/vpStatisticalTestSigma.h index 1b452801a0..6828e48c71 100644 --- a/modules/core/include/visp3/core/vpStatisticalTestSigma.h +++ b/modules/core/include/visp3/core/vpStatisticalTestSigma.h @@ -84,11 +84,7 @@ class VISP_EXPORT vpStatisticalTestSigma : public vpStatisticalTestAbstract * * \sa detectUpwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectDownwardMeanDrift() override; -#else - virtual vpMeanDriftType detectDownwardMeanDrift(); -#endif + virtual vpMeanDriftType detectDownwardMeanDrift() VP_OVERRIDE; /** * \brief Detects if an upward mean drift occurred on the mean. @@ -97,11 +93,7 @@ class VISP_EXPORT vpStatisticalTestSigma : public vpStatisticalTestAbstract * * \sa detectDownwardMeanDrift() */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual vpMeanDriftType detectUpwardMeanDrift() override; -#else - virtual vpMeanDriftType detectUpwardMeanDrift(); -#endif + virtual vpMeanDriftType detectUpwardMeanDrift() VP_OVERRIDE; /** * \brief Update m_s and if enough values are available, compute the mean, the standard @@ -109,22 +101,15 @@ class VISP_EXPORT vpStatisticalTestSigma : public vpStatisticalTestAbstract * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual bool updateStatistics(const float &signal) override; -#else - virtual bool updateStatistics(const float &signal); -#endif + virtual bool updateStatistics(const float &signal) VP_OVERRIDE; /** * \brief Update the test signals. * * \param[in] signal The new value of the signal to monitor. */ -#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) - virtual void updateTestSignals(const float &signal) override; -#else - virtual void updateTestSignals(const float &signal); -#endif + virtual void updateTestSignals(const float &signal) VP_OVERRIDE; + public: /** * \brief Construct a new vpStatisticalTestSigma object. diff --git a/modules/core/include/visp3/core/vpUKSigmaDrawerAbstract.h b/modules/core/include/visp3/core/vpUKSigmaDrawerAbstract.h index 76c225cc1f..6951449653 100644 --- a/modules/core/include/visp3/core/vpUKSigmaDrawerAbstract.h +++ b/modules/core/include/visp3/core/vpUKSigmaDrawerAbstract.h @@ -74,7 +74,7 @@ class VISP_EXPORT vpUKSigmaDrawerAbstract virtual std::vector drawSigmaPoints(const vpColVector &mean, const vpMatrix &covariance) = 0; /** - * \brief Computed the weigths that correspond to the sigma poitns that have been drawn. + * \brief Computed the weights that correspond to the sigma points that have been drawn. * * \return vpSigmaPointsWeights The weights that correspond to the sigma points. */ diff --git a/modules/core/include/visp3/core/vpUKSigmaDrawerMerwe.h b/modules/core/include/visp3/core/vpUKSigmaDrawerMerwe.h index 5c822b41ad..03bc5bece7 100644 --- a/modules/core/include/visp3/core/vpUKSigmaDrawerMerwe.h +++ b/modules/core/include/visp3/core/vpUKSigmaDrawerMerwe.h @@ -126,14 +126,14 @@ class VISP_EXPORT vpUKSigmaDrawerMerwe : public vpUKSigmaDrawerAbstract * \param[in] covariance The current process covariance of the UKF. * @return std::vector The sigma points. */ - virtual std::vector drawSigmaPoints(const vpColVector &mean, const vpMatrix &covariance) override; + virtual std::vector drawSigmaPoints(const vpColVector &mean, const vpMatrix &covariance) VP_OVERRIDE; /** - * \brief Computed the weigths that correspond to the sigma poitns that have been drawn. + * \brief Computed the weights that correspond to the sigma points that have been drawn. * * \return vpSigmaPointsWeights The weights that correspond to the sigma points. */ - virtual vpSigmaPointsWeights computeWeights() override; + virtual vpSigmaPointsWeights computeWeights() VP_OVERRIDE; protected: inline void computeLambda() { diff --git a/modules/core/src/math/matrix/vpMatrix_covariance.cpp b/modules/core/src/math/matrix/vpMatrix_covariance.cpp index 85cc9e6925..4f6dbb3873 100644 --- a/modules/core/src/math/matrix/vpMatrix_covariance.cpp +++ b/modules/core/src/math/matrix/vpMatrix_covariance.cpp @@ -83,7 +83,7 @@ vpMatrix vpMatrix::computeCovarianceMatrix(const vpMatrix &A, const vpColVector \param b : Vector b from WAx = Wb. - \param W : Diagonal weigths matrix from WAx = Wb. + \param W : Diagonal weights matrix from WAx = Wb. */ vpMatrix vpMatrix::computeCovarianceMatrix(const vpMatrix &A, const vpColVector &x, const vpColVector &b, const vpMatrix &W) diff --git a/modules/gui/src/pointcloud/vpPclViewer.cpp b/modules/gui/src/pointcloud/vpPclViewer.cpp index d1a8a67091..476b9a1256 100644 --- a/modules/gui/src/pointcloud/vpPclViewer.cpp +++ b/modules/gui/src/pointcloud/vpPclViewer.cpp @@ -253,14 +253,14 @@ unsigned int vpPclViewer::addSurface(const pclPointCloudPointXYZRGB::Ptr &surfac // Storing the weights attached to the surface m_vweights.push_back(weights); - bool use_weigths = weights.size() > 0; + bool use_weights = weights.size() > 0; // Copying the coordinates of each point of the original pcl, // while affecting them the default color. // Points that have a weight below \b s_ignoreThresh are ignored for (unsigned int index = 0; index < nbPoints; index++) { bool shouldPointBeVisible = false; - if (use_weigths) { + if (use_weights) { // If weights are defined, the point should be visible only // if the weight is greater than the ignore threshold. shouldPointBeVisible = weights[index] > s_ignoreThresh; diff --git a/modules/tracker/me/src/moving-edges/vpNurbs.cpp b/modules/tracker/me/src/moving-edges/vpNurbs.cpp index 9ec3a1cb6e..b778b50e4f 100644 --- a/modules/tracker/me/src/moving-edges/vpNurbs.cpp +++ b/modules/tracker/me/src/moving-edges/vpNurbs.cpp @@ -686,7 +686,7 @@ void vpNurbs::globalCurveApprox(std::vector &l_crossingPoints, uns Rj[i] = sum; sum = 0; for (unsigned int k = 0; k < m - 1; k++) - sum = sum + A[k][i]; // The crossing points weigths are equal to 1. + sum = sum + A[k][i]; // The crossing points weights are equal to 1. Rw[i] = sum; }