From: Vadim Pisarevsky Date: Fri, 17 Oct 2014 13:01:39 +0000 (+0400) Subject: fixed incorrect array access in solvepnp (which affected debug builds only) X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~2882^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4038beb67e269bac1ae048f0ef31c851ac9707d9;p=platform%2Fupstream%2Fopencv.git fixed incorrect array access in solvepnp (which affected debug builds only) --- diff --git a/modules/calib3d/src/upnp.h b/modules/calib3d/src/upnp.h index 8d87c35..cb7d8b9 100644 --- a/modules/calib3d/src/upnp.h +++ b/modules/calib3d/src/upnp.h @@ -73,12 +73,12 @@ private: { for(int i = 0; i < number_of_correspondences; i++) { - pws[3 * i ] = opoints.at(0,i).x; - pws[3 * i + 1] = opoints.at(0,i).y; - pws[3 * i + 2] = opoints.at(0,i).z; + pws[3 * i ] = opoints.at(i).x; + pws[3 * i + 1] = opoints.at(i).y; + pws[3 * i + 2] = opoints.at(i).z; - us[2 * i ] = ipoints.at(0,i).x; - us[2 * i + 1] = ipoints.at(0,i).y; + us[2 * i ] = ipoints.at(i).x; + us[2 * i + 1] = ipoints.at(i).y; } }