Skip to content

Commit b2524f4

Browse files
committed
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.
1 parent f109c01 commit b2524f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/stitching/src/motion_estimators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ bool AffineBasedEstimator::estimate(const std::vector<ImageFeatures> &features,
199199
const std::vector<MatchesInfo> &pairwise_matches,
200200
std::vector<CameraParams> &cameras)
201201
{
202-
cameras.resize(features.size());
202+
cameras.assign(features.size(), CameraParams());
203203
const int num_images = static_cast<int>(features.size());
204204

205205
// find maximum spaning tree on pairwise matches

0 commit comments

Comments
 (0)