Commit b2524f45 authored by Alexander Broemmer's avatar Alexander Broemmer

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.
parent f109c013
...@@ -199,7 +199,7 @@ bool AffineBasedEstimator::estimate(const std::vector<ImageFeatures> &features, ...@@ -199,7 +199,7 @@ bool AffineBasedEstimator::estimate(const std::vector<ImageFeatures> &features,
const std::vector<MatchesInfo> &pairwise_matches, const std::vector<MatchesInfo> &pairwise_matches,
std::vector<CameraParams> &cameras) std::vector<CameraParams> &cameras)
{ {
cameras.resize(features.size()); cameras.assign(features.size(), CameraParams());
const int num_images = static_cast<int>(features.size()); const int num_images = static_cast<int>(features.size());
// find maximum spaning tree on pairwise matches // find maximum spaning tree on pairwise matches
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment