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.
pull/8470/head
Alexander Broemmer 8 years ago
parent f109c0134f
commit b2524f4571
  1. 2
      modules/stitching/src/motion_estimators.cpp

@ -199,7 +199,7 @@ bool AffineBasedEstimator::estimate(const std::vector<ImageFeatures> &features,
const std::vector<MatchesInfo> &pairwise_matches,
std::vector<CameraParams> &cameras)
{
cameras.resize(features.size());
cameras.assign(features.size(), CameraParams());
const int num_images = static_cast<int>(features.size());
// find maximum spaning tree on pairwise matches

Loading…
Cancel
Save