From 109637e213ddd5f1ff4815dbd41265a13f96c91d Mon Sep 17 00:00:00 2001 From: Ruan <47767371+Ryyyc@users.noreply.github.com> Date: Mon, 18 Jan 2021 23:56:34 +0800 Subject: [PATCH] Update essential_mat_reconstr.cpp A small clerical error of an author. The correct expression should be "xy += x_*y_;". --- samples/cpp/essential_mat_reconstr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/essential_mat_reconstr.cpp b/samples/cpp/essential_mat_reconstr.cpp index bc9868d059..5a7b837311 100644 --- a/samples/cpp/essential_mat_reconstr.cpp +++ b/samples/cpp/essential_mat_reconstr.cpp @@ -80,7 +80,7 @@ static void getPlanes (InputArray points3d_, std::vector &labels, std::vect double xx = 0, yy = 0, zz = 0, xy = 0, xz = 0, yz = 0; for (int s : sample) { const double x_ = points[3*s] - c_x, y_ = points[3*s+1] - c_y, z_ = points[3*s+2] - c_z; - xx += x_*x_; yy += y_*y_; zz += z_*z_; xy = x_*y_; yz += y_*z_; xz += x_*z_; + xx += x_*x_; yy += y_*y_; zz += z_*z_; xy += x_*y_; yz += y_*z_; xz += x_*z_; } xx /= n; yy /= n; zz /= n; xy /= n; yz /= n; xz /= n; Vec3d weighted_normal(0,0,0); @@ -339,4 +339,4 @@ int main(int args, char** argv) { imshow("image 1-2", image1); imwrite("planes.png", image1); waitKey(0); -} \ No newline at end of file +}