diff --git a/modules/tracker/rbt/include/visp3/rbt/vpRBFeatureTrackerInput.h b/modules/tracker/rbt/include/visp3/rbt/vpRBFeatureTrackerInput.h index 64bf105c28..43e25e4a0a 100644 --- a/modules/tracker/rbt/include/visp3/rbt/vpRBFeatureTrackerInput.h +++ b/modules/tracker/rbt/include/visp3/rbt/vpRBFeatureTrackerInput.h @@ -59,6 +59,7 @@ struct VISP_EXPORT vpRBRenderData vpImage isSilhouette; //! Binary image indicating whether a given pixel is part of the silhouette double zNear, zFar; // clipping values vpRect boundingBox; + vpHomogeneousMatrix cMo; //! Pose of the object in the camera frame for which the renders were generated. vpRBRenderData() : zNear(0.0), zFar(0.0), boundingBox() { } @@ -82,6 +83,7 @@ struct VISP_EXPORT vpRBRenderData zNear = o.zNear; zFar = o.zFar; boundingBox = o.boundingBox; + cMo = o.cMo; return *this; } @@ -95,6 +97,7 @@ struct VISP_EXPORT vpRBRenderData zNear = std::move(o.zNear); zFar = std::move(o.zFar); boundingBox = std::move(o.boundingBox); + cMo = std::move(o.cMo); return *this; } }; diff --git a/modules/tracker/rbt/src/core/vpRBTracker.cpp b/modules/tracker/rbt/src/core/vpRBTracker.cpp index 8c1b9d668e..c159d27921 100644 --- a/modules/tracker/rbt/src/core/vpRBTracker.cpp +++ b/modules/tracker/rbt/src/core/vpRBTracker.cpp @@ -397,6 +397,8 @@ void vpRBTracker::updateRender(vpRBFeatureTrackerInput &frame) { m_renderer.setCameraPose(m_cMo.inverse()); + frame.renders.cMo = m_cMo; + // Update clipping distances frame.renders.normals.resize(m_imageHeight, m_imageWidth); frame.renders.silhouetteCanny.resize(m_imageHeight, m_imageWidth); @@ -496,7 +498,7 @@ std::vector vpRBTracker::extractSilhouettePoints( #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) { @@ -521,8 +523,8 @@ std::vector vpRBTracker::extractSilhouettePoints( // if (noNeighbor) { // points.push_back(vpRBSilhouettePoint(n, m, norm, theta, Z)); // } - } } +} return points; }