Skip to content

Commit

Permalink
Merge pull request opencv#3215 from dmitrygribanov:dg/stitching-wave-…
Browse files Browse the repository at this point in the history
…correction-bugfix
  • Loading branch information
vpisarev committed Sep 17, 2014
2 parents 550bd24 + ee0da48 commit d14d4bc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/stitching/src/motion_estimators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,14 @@ void waveCorrect(std::vector<Mat> &rmats, WaveCorrectKind kind)
for (size_t i = 0; i < rmats.size(); ++i)
img_k += rmats[i].col(2);
Mat rg0 = rg1.cross(img_k);
rg0 /= norm(rg0);
double rg0_norm = norm(rg0);

if( rg0_norm <= DBL_MIN )
{
return;
}

rg0 /= rg0_norm;

Mat rg2 = rg0.cross(rg1);

Expand Down

0 comments on commit d14d4bc

Please sign in to comment.