Skip to content

Commit

Permalink
Fix weighting to reflect what's in Antoine's thesis
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFlt committed Oct 23, 2024
1 parent 02b4911 commit 87f23e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/tracker/rbt/include/visp3/rbt/vpRBFeatureTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ class VISP_EXPORT vpRBFeatureTracker
/**
* \brief Get the importance of this tracker in the optimization step.
* The default computation is the following:
* \f$ \sqrt{w / N} \f$, where \f$ w\f$ is the weight defined by setTrackerWeight, and \f$ N \f$ is the number of features.
* \f$ w / N \f$, where \f$ w\f$ is the weight defined by setTrackerWeight, and \f$ N \f$ is the number of features.
*/
virtual double getVVSTrackerWeight() const { return sqrt(m_userVvsWeight / m_numFeatures); }
virtual double getVVSTrackerWeight() const { return m_userVvsWeight / m_numFeatures; }
void setTrackerWeight(double weight) { m_userVvsWeight = weight; }

/**
Expand Down
8 changes: 4 additions & 4 deletions modules/tracker/rbt/src/core/vpRBTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,11 @@ std::vector<vpRBSilhouettePoint> vpRBTracker::extractSilhouettePoints(
// double nx = cos(theta);
// double ny = sin(theta);
// const double Zn = Idepth[static_cast<unsigned int>(round(n + ny * 1))][static_cast<unsigned int>(round(m + nx * 2))];
if (m_verbose) {
if (fabs(theta) > M_PI + 1e-6) {
throw vpException(vpException::badValue, "Theta expected to be in -Pi, Pi range but was not");
}
#if defined(VISP_DEBUG_RB_TRACKER)
if (fabs(theta) > M_PI + 1e-6) {
throw vpException(vpException::badValue, "Theta expected to be in -Pi, Pi range but was not");
}
#endif
points.push_back(vpRBSilhouettePoint(n, m, norm, theta, Z));
// if (Zn > 0) {
// theta = -theta;
Expand Down

0 comments on commit 87f23e3

Please sign in to comment.