Commit b74e9c10 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

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

parent 602ad619
...@@ -839,8 +839,8 @@ namespace cv { namespace gpu { namespace imgproc ...@@ -839,8 +839,8 @@ namespace cv { namespace gpu { namespace imgproc
y = ck_rinv[3] * x_ + ck_rinv[4] * y_ + ck_rinv[5] * z_; 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_; z = ck_rinv[6] * x_ + ck_rinv[7] * y_ + ck_rinv[8] * z_;
x /= z; if (z > 0) { x /= z; y /= z; }
y /= z; else x = y = -1;
} }
}; };
...@@ -865,8 +865,8 @@ namespace cv { namespace gpu { namespace imgproc ...@@ -865,8 +865,8 @@ namespace cv { namespace gpu { namespace imgproc
y = ck_rinv[3] * x_ + ck_rinv[4] * y_ + ck_rinv[5] * z_; 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_; z = ck_rinv[6] * x_ + ck_rinv[7] * y_ + ck_rinv[8] * z_;
x /= z; if (z > 0) { x /= z; y /= z; }
y /= z; else x = y = -1;
} }
}; };
......
...@@ -262,8 +262,8 @@ void SphericalProjector::mapBackward(float u, float v, float &x, float &y) ...@@ -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_; 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_; z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;
x /= z; if (z > 0) { x /= z; y /= z; }
y /= z; else x = y = -1;
} }
...@@ -294,8 +294,8 @@ void CylindricalProjector::mapBackward(float u, float v, float &x, float &y) ...@@ -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_; 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_; z = k_rinv[6] * x_ + k_rinv[7] * y_ + k_rinv[8] * z_;
x /= z; if (z > 0) { x /= z; y /= z; }
y /= z; else x = y = -1;
} }
} // namespace detail } // namespace detail
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment