From 0c744c6473bc6630025a1363d6bbd0f78f793a40 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Sun, 16 Jun 2019 10:12:18 +0300 Subject: [PATCH] Fix to src target wrong way --- applications/registration/src/correspondances.cpp | 6 +++--- applications/registration/src/correspondances.hpp | 4 ++-- applications/registration/src/manual.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/registration/src/correspondances.cpp b/applications/registration/src/correspondances.cpp index 7c8aa95f8..58eb1c6e2 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 a3019766a..2c09ab4d8 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 ea34abb02..c9102f98e 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); -- GitLab