36 #include <visp3/core/vpConfig.h>
38 #if defined(VISP_HAVE_NLOHMANN_JSON) && defined(VISP_HAVE_THREADS)
40 #include <visp3/dnn_tracker/vpMegaPoseTracker.h>
46 std::vector<vpRect> bbs = {bb};
47 m_poseEstimate = m_megapose->estimatePoses(I, {m_objectLabel},
nullptr, 0.0, &bbs,
nullptr)[0];
49 return m_poseEstimate;
55 std::vector<vpHomogeneousMatrix> poses = { cTo };
56 m_poseEstimate = m_megapose->estimatePoses(I, { m_objectLabel },
nullptr, 0.0,
nullptr, &poses)[0];
58 return m_poseEstimate;
68 std::vector<vpHomogeneousMatrix> poses = {m_poseEstimate.
cTo};
69 m_poseEstimate = m_megapose->estimatePoses(I, {m_objectLabel},
nullptr, 0.0,
nullptr, &poses, m_refinerIterations)[0];
70 return m_poseEstimate;
76 m_poseEstimate.
cTo = cTo;
79 #elif !defined(VISP_BUILD_SHARED_LIBS)
81 void dummy_vpMegaPoseTracker(){};
error that can be emitted by ViSP classes.
@ notInitialized
Used to indicate that a parameter is not initialized.
Implementation of an homogeneous matrix and operations on such kind of matrices.
std::future< vpMegaPoseEstimate > track(const vpImage< vpRGBa > &I)
Track the object in the image. Requires the tracker to be initialized by calling init.
std::future< vpMegaPoseEstimate > init(const vpImage< vpRGBa > &I, const vpRect &bb)
Initialize tracking. Performs a full object pose estimation with megapose.
void updatePose(const vpHomogeneousMatrix &cTo)
Update the current pose estimate with a new one, provided by an external source. No operation (such a...
Defines a rectangle in the plane.