From b2524f45717bf66eb78adb83bb7cc755bb3aacab Mon Sep 17 00:00:00 2001 From: Alexander Broemmer Date: Tue, 28 Mar 2017 14:31:00 +0200 Subject: [PATCH] Clear old CameraParameters in AffineBasedEstimator AffineBasedEstimator crashed when called with an existing CameraParameters. This happens e.g. when using Stitcher in SCANS mode. CameraraParameters is now cleared before any calculation is executed. --- modules/stitching/src/motion_estimators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/stitching/src/motion_estimators.cpp b/modules/stitching/src/motion_estimators.cpp index f76309f777..925bb44de1 100644 --- a/modules/stitching/src/motion_estimators.cpp +++ b/modules/stitching/src/motion_estimators.cpp @@ -199,7 +199,7 @@ bool AffineBasedEstimator::estimate(const std::vector &features, const std::vector &pairwise_matches, std::vector &cameras) { - cameras.resize(features.size()); + cameras.assign(features.size(), CameraParams()); const int num_images = static_cast(features.size()); // find maximum spaning tree on pairwise matches -- GitLab