Maybe I should ask my question in this way.
Is the objectPoints (first parameter) in solvePnP the same to the InputArray objectPoints of projectPoints(first parameter).
Yes, objectPoints
are object points relative to any part of object. No need to recalculate it to coordinates of camera! In solvePnP()
you use objectPoints
and result is object pose relative to camera.
In projectPoints()
you use the same set of objectPoints
and also rvec
and tvec
(the estimated pose of object). You can understand it as inverse function of solvePnP()
.
If the reprojection error is high, check if object points are defined correctly (measure them) and also make sure to have good intrinsic calibration of camera.