I'm trying to recover intrinsic and extrinsic camera settings from a photo. To do this, I need to estimate the translation and rotation of the camera. The estimate of the translation is correct, but I have a problem of rotation. I know the position of the camera, as well as the intrinsic and extrinsic matrices. I now have to update the extrinsic matrix after rotating the camera around a point of focus.
At first I just changed the rotation to Euler angle, then slightly, but it did not work because the rotation revolved around a distant point (I do not know which point, I only have the information I gave you at the beginning, now I want to rotate my pinhole camera around a focus point I know how to get the new camera position (after rotation), but I do not know how to get a new rotation and translation of the camera (I need them to use cv :: projectpoints ()). I use Eigen and opencv.
rotation_start is my first modified with angles (XYZ)
the solution is the angle at which I want to rotate my camera
rotation = rotation_start + solution; rotation = rotation_start + solution; rotation = rotation_start + solution; cv :: Mat rvec; camera.eulerAnglesToRvec (rotation, rvec); getNewCameraPosition (solution, focus_point, cam_pos);