1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

switched float with short in blending step (opencv_stitching)

This commit is contained in:
Alexey Spizhevoy
2011-05-23 13:08:31 +00:00
parent 5bf8109dbc
commit f44632ee6f
4 changed files with 37 additions and 23 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ double estimateFocal(const vector<ImageFeatures> &features, const vector<Matches
}
}
if (static_cast<int>(focals.size()) >= 2 * (num_images - 1))
if (static_cast<int>(focals.size()) >= num_images * (num_images - 1) / 2)
{
nth_element(focals.begin(), focals.end(), focals.begin() + focals.size()/2);
return focals[focals.size()/2];