diff --git a/modules/calib3d/src/upnp.h b/modules/calib3d/src/upnp.h index 8d87c35fc7..cb7d8b9477 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; } }