From d1c7983fe5e94d064b274fbc5acf658ff8f7f07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Kov=C3=A1cs?= Date: Mon, 21 Jul 2014 17:27:03 +0200 Subject: [PATCH] calibrateDebevec index fix (issue 3664) --- modules/photo/src/calibrate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/photo/src/calibrate.cpp b/modules/photo/src/calibrate.cpp index 23b612995a..e9fb461f5b 100644 --- a/modules/photo/src/calibrate.cpp +++ b/modules/photo/src/calibrate.cpp @@ -104,7 +104,7 @@ public: for(size_t i = 0; i < sample_points.size(); i++) { for(size_t j = 0; j < images.size(); j++) { - int val = images[j].ptr()[3*(sample_points[i].y * images[j].cols + sample_points[j].x) + channel]; + int val = images[j].ptr()[3*(sample_points[i].y * images[j].cols + sample_points[i].x) + channel]; A.at(eq, val) = w.at(val); A.at(eq, LDR_SIZE + (int)i) = -w.at(val); B.at(eq, 0) = w.at(val) * log(times.at((int)j));