diff --git a/applications/registration/src/correspondances.cpp b/applications/registration/src/correspondances.cpp index 7c8aa95f88928fc75bd2e9095df1d4036e5b0876..58eb1c6e2cb9b7bad3873225ae0bbfe61a9d99c3 100644 --- a/applications/registration/src/correspondances.cpp +++ b/applications/registration/src/correspondances.cpp @@ -14,15 +14,15 @@ using std::tuple; using std::make_tuple; -Correspondances::Correspondances(Source *targ, Source *src) +Correspondances::Correspondances(Source *src, Source *targ) : parent_(nullptr), targ_(targ), src_(src), targ_cloud_(new PointCloud<PointXYZ>), src_cloud_(new PointCloud<PointXYZ>), uptodate_(true) { transform_.setIdentity(); } -Correspondances::Correspondances(Correspondances *parent, Source *targ) - : parent_(parent), targ_(targ), src_(parent_->target()), +Correspondances::Correspondances(Correspondances *parent, Source *src) + : parent_(parent), targ_(parent_->source()), src_(src), targ_cloud_(new PointCloud<PointXYZ>), src_cloud_(new PointCloud<PointXYZ>), uptodate_(true) { transform_.setIdentity(); diff --git a/applications/registration/src/correspondances.hpp b/applications/registration/src/correspondances.hpp index a3019766a9e3eef57b860bfc6b18c65f9ac283a0..2c09ab4d87f8760b2a7f0c3b50633f83e870ceab 100644 --- a/applications/registration/src/correspondances.hpp +++ b/applications/registration/src/correspondances.hpp @@ -26,8 +26,8 @@ namespace registration { */ class Correspondances { public: - Correspondances(ftl::rgbd::Source *targ, ftl::rgbd::Source *src); - Correspondances(Correspondances *parent, ftl::rgbd::Source *targ); + Correspondances(ftl::rgbd::Source *src, ftl::rgbd::Source *targ); + Correspondances(Correspondances *parent, ftl::rgbd::Source *src); ftl::rgbd::Source *source() { return src_; } ftl::rgbd::Source *target() { return targ_; } diff --git a/applications/registration/src/manual.cpp b/applications/registration/src/manual.cpp index ea34abb02810aca038761110c5dfe0cd2a48ce00..c9102f98ed92064cb00c089fc3dee92a311e8d2e 100644 --- a/applications/registration/src/manual.cpp +++ b/applications/registration/src/manual.cpp @@ -174,7 +174,7 @@ void ftl::registration::manual(ftl::Configurable *root) { if (!trgb.empty()) imshow("Target", trgb); if (!srgb.empty()) imshow("Source", srgb); - } else { + } else if (current->source()->isReady() && current->target()->isReady()) { current->source()->getFrames(tsrgb, tsdepth); current->target()->getFrames(ttrgb, ttdepth); tsrgb.copyTo(srgb);