I used solvePnP to obtain extrinsic camera information. I have a camera with calibrated intrinsic information and Distortion Coefficients, corresponding 3D world coordinates and 2D detections from that camera. Changing the values of the corresponding 3D and 2D 4 pairs in the same image changes the result of solvepnp.
Using cornersubpix, I found the values of the detected corners more accurately