Fixed bug in the stitching module (some images appeared at result pano center)

pull/13383/head
Alexey Spizhevoy 14 years ago
parent 602ad61967
commit b74e9c101a
  1. 8
      modules/gpu/src/cuda/imgproc.cu
  2. 8
      modules/stitching/include/opencv2/stitching/detail/warpers_inl.hpp

@ -839,8 +839,8 @@ namespace cv { namespace gpu { namespace imgproc
y = ck_rinv[3] * x_ + ck_rinv[4] * y_ + ck_rinv[5] * z_;
z = ck_rinv[6] * x_ + ck_rinv[7] * y_ + ck_rinv[8] * z_;
x /= z;
y /= z;
if (z > 0) { x /= z; y /= z; }
else x = y = -1;
}
};
@ -865,8 +865,8 @@ namespace cv { namespace gpu { namespace imgproc
y = ck_rinv[3] * x_ + ck_rinv[4] * y_ + ck_rinv[5] * z_;
z = ck_rinv[6] * x_ + ck_rinv[7] * y_ + ck_rinv[8] * z_;
x /= z;
y /= z;
if (z > 0) { x /= z; y /= z; }
else x = y = -1;
}
};

@ -262,8 +262,8 @@ void SphericalProjector::mapBackward(float u, float v, float &x, float &y)
y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;
z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;
x /= z;
y /= z;
if (z > 0) { x /= z; y /= z; }
else x = y = -1;
}
@ -294,8 +294,8 @@ void CylindricalProjector::mapBackward(float u, float v, float &x, float &y)
y = k_rinv[3] * x_ + k_rinv[4] * y_ + k_rinv[5] * z_;
z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;
x /= z;
y /= z;
if (z > 0) { x /= z; y /= z; }
else x = y = -1;
}
} // namespace detail

Loading…
Cancel
Save